Role-Based Authentication
...
{
path: '',
component: AdminLayout,
canActivateChild: [AuthGuardChild],
children: [
{
path: 'dashboard',
loadChildren: () => import('./demo/dashboard/dashboard.module').then((m) => m.DashboardModule),
data: { roles: [Role.Admin, Role.User] }
},
{
path: 'widget/statistics',
loadComponent: () => import('./demo/widget/statistics/statistics.component').then((c) => c.StatisticsComponent),
data: {
roles: [Role.Admin, Role.User]
}
},
]
}
...Last updated