docs: fix broken lazy loading examples with Angular CLI RC upgrade (#25892)
PR Close #25892
This commit is contained in:
parent
f922808b8d
commit
67ad9468d3
|
@ -8,11 +8,11 @@ import { Routes, RouterModule } from '@angular/router';
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: 'customers',
|
path: 'customers',
|
||||||
loadChildren: 'app/customers/customers.module#CustomersModule'
|
loadChildren: './customers/customers.module#CustomersModule'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'orders',
|
path: 'orders',
|
||||||
loadChildren: 'app/orders/orders.module#OrdersModule'
|
loadChildren: './orders/orders.module#OrdersModule'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
|
|
|
@ -5,8 +5,8 @@ import { ContactModule } from './contact/contact.module.3';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', redirectTo: 'contact', pathMatch: 'full'},
|
{ path: '', redirectTo: 'contact', pathMatch: 'full'},
|
||||||
{ path: 'crisis', loadChildren: 'app/crisis/crisis.module#CrisisModule' },
|
{ path: 'crisis', loadChildren: './crisis/crisis.module#CrisisModule' },
|
||||||
{ path: 'heroes', loadChildren: 'app/hero/hero.module.3#HeroModule' }
|
{ path: 'heroes', loadChildren: './hero/hero.module.3#HeroModule' }
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -8,8 +8,8 @@ import { ContactModule } from './contact/contact.module';
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{ path: '', redirectTo: 'contact', pathMatch: 'full'},
|
{ path: '', redirectTo: 'contact', pathMatch: 'full'},
|
||||||
// #docregion lazy-routes
|
// #docregion lazy-routes
|
||||||
{ path: 'crisis', loadChildren: 'app/crisis/crisis.module#CrisisModule' },
|
{ path: 'crisis', loadChildren: './crisis/crisis.module#CrisisModule' },
|
||||||
{ path: 'heroes', loadChildren: 'app/hero/hero.module#HeroModule' }
|
{ path: 'heroes', loadChildren: './hero/hero.module#HeroModule' }
|
||||||
// #enddocregion lazy-routes
|
// #enddocregion lazy-routes
|
||||||
];
|
];
|
||||||
// #enddocregion routes
|
// #enddocregion routes
|
||||||
|
|
|
@ -3,8 +3,8 @@ import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
export const routes: Routes = [
|
export const routes: Routes = [
|
||||||
{ path: '', redirectTo: 'contact', pathMatch: 'full'},
|
{ path: '', redirectTo: 'contact', pathMatch: 'full'},
|
||||||
{ path: 'items', loadChildren: 'app/items/items.module#ItemsModule' },
|
{ path: 'items', loadChildren: './items/items.module#ItemsModule' },
|
||||||
{ path: 'customers', loadChildren: 'app/customers/customers.module#CustomersModule' }
|
{ path: 'customers', loadChildren: './customers/customers.module#CustomersModule' }
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { AboutComponent } from './about/about.component';
|
||||||
RouterModule.forRoot([
|
RouterModule.forRoot([
|
||||||
{ path: '', redirectTo: 'dashboard', pathMatch: 'full'},
|
{ path: '', redirectTo: 'dashboard', pathMatch: 'full'},
|
||||||
{ path: 'about', component: AboutComponent },
|
{ path: 'about', component: AboutComponent },
|
||||||
{ path: 'heroes', loadChildren: 'app/hero/hero.module#HeroModule'}
|
{ path: 'heroes', loadChildren: './hero/hero.module#HeroModule'}
|
||||||
])
|
])
|
||||||
],
|
],
|
||||||
exports: [ RouterModule ] // re-export the module declarations
|
exports: [ RouterModule ] // re-export the module declarations
|
||||||
|
|
Loading…
Reference in New Issue