import { NgModule } from '@angular/core' ; import { RouterModule , Routes } from '@angular/router' ; import { LayoutComponent } from '.' ; const layoutRoutes = [ { path : '' , component : LayoutComponent , children : [ { path : '' , redirectTo : 'resources' } , { path : 'resources' , loadChildren : '@app/resources/resources.module#ResourcesModule' } , { path : 'examples' , loadChildren : '@app/examples/examples.module#ExamplesModule' } ] } ] ; @ NgModule ( { exports : [ RouterModule ] , imports : [ RouterModule . forChild ( layoutRoutes ) ] } ) export class LayoutRouter { }