docs: replace lazy loading import syntax parameter name (#34599)
We replace `mod` with `m` to be in line with what the CLI generates. PR Close #34599
This commit is contained in:
parent
7cdc118c8e
commit
8f389361ec
|
@ -8,12 +8,12 @@ import { Routes, RouterModule } from '@angular/router';
|
|||
const routes: Routes = [
|
||||
{
|
||||
path: 'customers',
|
||||
loadChildren: () => import('./customers/customers.module').then(mod => mod.CustomersModule)
|
||||
loadChildren: () => import('./customers/customers.module').then(m => m.CustomersModule)
|
||||
// #enddocregion routes-customers
|
||||
},
|
||||
{
|
||||
path: 'orders',
|
||||
loadChildren: () => import('./orders/orders.module').then(mod => mod.OrdersModule)
|
||||
loadChildren: () => import('./orders/orders.module').then(m => m.OrdersModule)
|
||||
// #enddocregion routes-customers-orders
|
||||
},
|
||||
{
|
||||
|
|
|
@ -3,8 +3,8 @@ import { Routes, RouterModule } from '@angular/router';
|
|||
|
||||
export const routes: Routes = [
|
||||
{ path: '', redirectTo: 'contact', pathMatch: 'full'},
|
||||
{ path: 'items', loadChildren: () => import('./items/items.module').then(mod => mod.ItemsModule) },
|
||||
{ path: 'customers', loadChildren: () => import('./customers/customers.module').then(mod => mod.CustomersModule) }
|
||||
{ path: 'items', loadChildren: () => import('./items/items.module').then(m => m.ItemsModule) },
|
||||
{ path: 'customers', loadChildren: () => import('./customers/customers.module').then(m => m.CustomersModule) }
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
|
|
@ -20,7 +20,7 @@ const appRoutes: Routes = [
|
|||
// #docregion admin, admin-1
|
||||
{
|
||||
path: 'admin',
|
||||
loadChildren: () => import('./admin/admin.module').then(mod => mod.AdminModule),
|
||||
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule),
|
||||
// #enddocregion admin-1
|
||||
canLoad: [AuthGuard]
|
||||
// #docregion admin-1
|
||||
|
|
|
@ -21,12 +21,12 @@ const appRoutes: Routes = [
|
|||
},
|
||||
{
|
||||
path: 'admin',
|
||||
loadChildren: () => import('./admin/admin.module').then(mod => mod.AdminModule),
|
||||
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule),
|
||||
canLoad: [AuthGuard]
|
||||
},
|
||||
{
|
||||
path: 'crisis-center',
|
||||
loadChildren: () => import('./crisis-center/crisis-center.module').then(mod => mod.CrisisCenterModule)
|
||||
loadChildren: () => import('./crisis-center/crisis-center.module').then(m => m.CrisisCenterModule)
|
||||
},
|
||||
{ path: '', redirectTo: '/heroes', pathMatch: 'full' },
|
||||
{ path: '**', component: PageNotFoundComponent }
|
||||
|
|
|
@ -17,13 +17,13 @@ const appRoutes: Routes = [
|
|||
},
|
||||
{
|
||||
path: 'admin',
|
||||
loadChildren: () => import('./admin/admin.module').then(mod => mod.AdminModule),
|
||||
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule),
|
||||
canLoad: [AuthGuard]
|
||||
},
|
||||
// #docregion preload-v2
|
||||
{
|
||||
path: 'crisis-center',
|
||||
loadChildren: () => import('./crisis-center/crisis-center.module').then(mod => mod.CrisisCenterModule),
|
||||
loadChildren: () => import('./crisis-center/crisis-center.module').then(m => m.CrisisCenterModule),
|
||||
data: { preload: true }
|
||||
},
|
||||
// #enddocregion preload-v2
|
||||
|
|
|
@ -8,7 +8,7 @@ import { AboutComponent } from './about/about.component';
|
|||
RouterModule.forRoot([
|
||||
{ path: '', redirectTo: 'dashboard', pathMatch: 'full'},
|
||||
{ path: 'about', component: AboutComponent },
|
||||
{ path: 'heroes', loadChildren: () => import('./hero/hero.module').then(mod => mod.HeroModule)}
|
||||
{ path: 'heroes', loadChildren: () => import('./hero/hero.module').then(m => m.HeroModule)}
|
||||
])
|
||||
],
|
||||
exports: [ RouterModule ] // re-export the module declarations
|
||||
|
|
|
@ -7,39 +7,39 @@ import { LoadChildrenCallback } from '@angular/router';
|
|||
export const ELEMENT_MODULE_LOAD_CALLBACKS_AS_ROUTES = [
|
||||
{
|
||||
selector: 'aio-announcement-bar',
|
||||
loadChildren: () => import('./announcement-bar/announcement-bar.module').then(mod => mod.AnnouncementBarModule)
|
||||
loadChildren: () => import('./announcement-bar/announcement-bar.module').then(m => m.AnnouncementBarModule)
|
||||
},
|
||||
{
|
||||
selector: 'aio-api-list',
|
||||
loadChildren: () => import('./api/api-list.module').then(mod => mod.ApiListModule)
|
||||
loadChildren: () => import('./api/api-list.module').then(m => m.ApiListModule)
|
||||
},
|
||||
{
|
||||
selector: 'aio-contributor-list',
|
||||
loadChildren: () => import('./contributor/contributor-list.module').then(mod => mod.ContributorListModule)
|
||||
loadChildren: () => import('./contributor/contributor-list.module').then(m => m.ContributorListModule)
|
||||
},
|
||||
{
|
||||
selector: 'aio-file-not-found-search',
|
||||
loadChildren: () => import('./search/file-not-found-search.module').then(mod => mod.FileNotFoundSearchModule)
|
||||
loadChildren: () => import('./search/file-not-found-search.module').then(m => m.FileNotFoundSearchModule)
|
||||
},
|
||||
{
|
||||
selector: 'aio-resource-list',
|
||||
loadChildren: () => import('./resource/resource-list.module').then(mod => mod.ResourceListModule)
|
||||
loadChildren: () => import('./resource/resource-list.module').then(m => m.ResourceListModule)
|
||||
},
|
||||
{
|
||||
selector: 'aio-toc',
|
||||
loadChildren: () => import('./toc/toc.module').then(mod => mod.TocModule)
|
||||
loadChildren: () => import('./toc/toc.module').then(m => m.TocModule)
|
||||
},
|
||||
{
|
||||
selector: 'code-example',
|
||||
loadChildren: () => import('./code/code-example.module').then(mod => mod.CodeExampleModule)
|
||||
loadChildren: () => import('./code/code-example.module').then(m => m.CodeExampleModule)
|
||||
},
|
||||
{
|
||||
selector: 'code-tabs',
|
||||
loadChildren: () => import('./code/code-tabs.module').then(mod => mod.CodeTabsModule)
|
||||
loadChildren: () => import('./code/code-tabs.module').then(m => m.CodeTabsModule)
|
||||
},
|
||||
{
|
||||
selector: 'live-example',
|
||||
loadChildren: () => import('./live-example/live-example.module').then(mod => mod.LiveExampleModule)
|
||||
loadChildren: () => import('./live-example/live-example.module').then(m => m.LiveExampleModule)
|
||||
}
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in New Issue