-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathapp-routing.module.ts
33 lines (29 loc) · 954 Bytes
/
app-routing.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {SimpleRouteComponent} from './simple-route/simple-route.component';
import {BundledModule} from './bundled/bundled.module';
export function loadBundledModule() { return BundledModule; }
export const routes: Routes = [
{
path: '',
pathMatch: 'full',
component: SimpleRouteComponent
},
{
path: 'bundled',
loadChildren: loadBundledModule
// Comment loadChildren above and uncomment the line below to get non lazy loading working with AoT
// Do not delete / comment the `loadBundledModule` declaration or the module will be lazy loaded
// loadChildren: './bundled/bundled.module#BundledModule'
},
{
path: 'lazy',
loadChildren: './lazy/lazy.module#LazyModule'
}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
providers: []
})
export class AppRoutingModule { }