docs: use dynamic import syntax in examples using lazy loading (#30563)
PR Close #30563
This commit is contained in:
@ -20,7 +20,7 @@ const appRoutes: Routes = [
|
||||
// #docregion admin, admin-1
|
||||
{
|
||||
path: 'admin',
|
||||
loadChildren: './admin/admin.module#AdminModule',
|
||||
loadChildren: () => import('./admin/admin.module').then(mod => mod.AdminModule),
|
||||
// #enddocregion admin-1
|
||||
canLoad: [AuthGuard]
|
||||
// #docregion admin-1
|
||||
|
@ -21,12 +21,12 @@ const appRoutes: Routes = [
|
||||
},
|
||||
{
|
||||
path: 'admin',
|
||||
loadChildren: './admin/admin.module#AdminModule',
|
||||
loadChildren: () => import('./admin/admin.module').then(mod => mod.AdminModule),
|
||||
canLoad: [AuthGuard]
|
||||
},
|
||||
{
|
||||
path: 'crisis-center',
|
||||
loadChildren: './crisis-center/crisis-center.module#CrisisCenterModule'
|
||||
loadChildren: () => import('./crisis-center/crisis-center.module').then(mod => mod.CrisisCenterModule)
|
||||
},
|
||||
{ path: '', redirectTo: '/heroes', pathMatch: 'full' },
|
||||
{ path: '**', component: PageNotFoundComponent }
|
||||
|
@ -17,13 +17,13 @@ const appRoutes: Routes = [
|
||||
},
|
||||
{
|
||||
path: 'admin',
|
||||
loadChildren: './admin/admin.module#AdminModule',
|
||||
loadChildren: () => import('./admin/admin.module').then(mod => mod.AdminModule),
|
||||
canLoad: [AuthGuard]
|
||||
},
|
||||
// #docregion preload-v2
|
||||
{
|
||||
path: 'crisis-center',
|
||||
loadChildren: './crisis-center/crisis-center.module#CrisisCenterModule',
|
||||
loadChildren: () => import('./crisis-center/crisis-center.module').then(mod => mod.CrisisCenterModule),
|
||||
data: { preload: true }
|
||||
},
|
||||
// #enddocregion preload-v2
|
||||
|
Reference in New Issue
Block a user