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:
Alan Agius
2019-12-31 08:35:27 +01:00
committed by Alex Rickabaugh
parent 15c8efd5ef
commit 56be6288a0
7 changed files with 19 additions and 19 deletions

View File

@ -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
},
{

View File

@ -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({

View File

@ -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

View File

@ -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 }

View File

@ -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

View File

@ -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