import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { SettingsComponent } from './settings.component' ; import { PermissionGuard } from '../auth/guards/permission.guard' ; import { DateSettingsComponent } from './date-settings/date-settings.component' ; const routes = [ { path : '' , canActivate : [ PermissionGuard ] , data : { breadcrumb : 'Overview' , right : 'base.system.view' } , component : SettingsComponent } , { path : 'system' , canActivateChild : [ PermissionGuard ] , data : { breadcrumb : 'System' } , loadChildren : ( ) => import ( './system/system.module' ) . then ( m => m . SystemModule ) } , { path : 'logs' , data : { breadcrumb : 'Logs' } , loadChildren : ( ) => import ( './log-settings/log-settings.module' ) . then ( m => m . LogSettingsModule ) } , { path : 'auth' , canActivateChild : [ PermissionGuard ] , data : { breadcrumb : 'Authentication' } , loadChildren : ( ) => import ( './auth-settings/auth-settings.module' ) . then ( m => m . AuthSettingsModule ) } , { path : 'regional-settings' , data : { breadcrumb : 'Regional Settings' , right : 'base.system.edit' } , component : DateSettingsComponent } ] ; @ NgModule ( { imports : [ RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] } ) export class SettingsRoutingModule { }