import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { environment } from '@env/environment' ; import { LayoutComponent } from '../layout/default/layout.component' ; import { DashboardV1Component } from './dashboard/v1/v1.component' ; import { DashboardAnalysisComponent } from './dashboard/analysis/analysis.component' ; import { DashboardMonitorComponent } from './dashboard/monitor/monitor.component' ; import { DashboardWorkplaceComponent } from './dashboard/workplace/workplace.component' ; const routes = [ { path : '' , component : LayoutComponent , children : [ { path : 'dashboard/v1' , component : DashboardV1Component } , { path : 'dashboard/analysis' , component : DashboardAnalysisComponent } , { path : 'dashboard/monitor' , component : DashboardMonitorComponent } , { path : 'dashboard/workplace' , component : DashboardWorkplaceComponent } , { path : 'widgets' , loadChildren : './widgets/widgets.module#WidgetsModule' } , { path : 'elements' , loadChildren : './elements/elements.module#ElementsModule' } , { path : 'other' , loadChildren : './other/other.module#OtherModule' } , { path : 'forms' , loadChildren : './forms/forms.module#FormsModule' } , { path : 'editor' , loadChildren : './editor/editor.module#EditorModule' } , { path : 'charts' , loadChildren : './charts/charts.module#ChartsModule' } , { path : 'tables' , loadChildren : './tables/tables.module#TablesModule' } , { path : 'maps' , loadChildren : './maps/maps.module#MapsModule' } , { path : 'extras' , loadChildren : './extras/extras.module#ExtrasModule' } , { path : 'pro' , loadChildren : './pro/pro.module#ProModule' } ] } ] ; @ NgModule ( { imports : [ RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] , providers : [ ] } ) export class RouteRoutingModule { }