import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { FrameworkComponent } from './framework.component' ; import { PermissionGuard } from '../auth/guards/permission.guard' ; const routes = [ { path : '' , pathMatch : 'full' , canActivate : [ PermissionGuard ] , data : { breadcrumb : 'Overview' } , component : FrameworkComponent } , { path : 'object' , canActivateChild : [ PermissionGuard ] , data : { breadcrumb : 'Object' , right : 'base.framework.object.view' } , loadChildren : ( ) => import ( './object/object.module' ) . then ( m => m . ObjectModule ) , } , { path : 'type' , canActivateChild : [ PermissionGuard ] , data : { breadcrumb : 'Type' , right : 'base.framework.type.view' } , loadChildren : ( ) => import ( './type/type.module' ) . then ( m => m . TypeModule ) , } , { path : 'category' , canActivateChild : [ PermissionGuard ] , data : { breadcrumb : 'Category' , right : 'base.framework.category.view' } , loadChildren : ( ) => import ( './category/category.module' ) . then ( m => m . CategoryModule ) , } ] ; @ NgModule ( { imports : [ RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] } ) export class FrameworkRoutingModule { }