I want to create Admin role and user role for separate routes
app.routing.ts
import {RouterModule, Routes} from '@angular/router';
import { NgModule } from '@angular/core';
const appRoutes: Routes = [
{
path:'',
loadChildren: './client/client.route.module#ClientRouteModule'
},
{
path:'admin',
loadChildren: './admin/admin.route.module#AdminRouteModule'
}
];
@NgModule({
declarations: [],
imports: [RouterModule.forRoot(appRoutes)],
providers: [],
bootstrap: [],
exports: [RouterModule]
})
export class AppRoutingModule { }
in this code how to create and add role for user and admin. something else add in child routes? I want to create role for / for open frontend login and /admin for admin login still i have a problem for login without role. once login in frontend then admin automatic logged in because role is not added in local storage. I want to define role and store in local storage
Thank you