mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-11 21:33:02 -05:00
37 lines
956 B
TypeScript
37 lines
956 B
TypeScript
import { IsAuthorizedGuard } from '@angular-challenges/module-to-standalone/admin/shared';
|
|
import { Route } from '@angular/router';
|
|
|
|
export const appRoutes: Route[] = [
|
|
{ path: '', redirectTo: 'home', pathMatch: 'full' },
|
|
{
|
|
path: 'home',
|
|
loadChildren: () =>
|
|
import('@angular-challenges/module-to-standalone/home').then(
|
|
(m) => m.ModuleToStandaloneHomeModule,
|
|
),
|
|
},
|
|
{
|
|
path: 'admin',
|
|
canActivate: [IsAuthorizedGuard],
|
|
loadChildren: () =>
|
|
import('@angular-challenges/module-to-standalone/admin/feature').then(
|
|
(m) => m.AdminFeatureModule,
|
|
),
|
|
},
|
|
{
|
|
path: 'user',
|
|
loadChildren: () =>
|
|
import('@angular-challenges/module-to-standalone/user/shell').then(
|
|
(m) => m.UserShellModule,
|
|
),
|
|
},
|
|
|
|
{
|
|
path: 'forbidden',
|
|
loadChildren: () =>
|
|
import('@angular-challenges/module-to-standalone/forbidden').then(
|
|
(m) => m.ForbiddenModule,
|
|
),
|
|
},
|
|
];
|