import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { CategoryComponent } from './category.component' ; import { CategoryAddComponent } from './category-add/category-add.component' ; import { CategoryEditComponent } from './category-edit/category-edit.component' ; import { CmdbMode } from '../modes.enum' ; import { CategoryViewComponent } from './category-view/category-view.component' ; import { UserSettingsResolver } from '../../management/user-settings/resolvers/user-settings-resolver.service' ; const routes = [ { path : '' , pathMatch : 'full' , data : { breadcrumb : 'List' , right : 'base.framework.category.view' , mode : CmdbMode . View } , resolve : { userSetting : UserSettingsResolver } , component : CategoryComponent } , { path : 'view/:publicID' , data : { breadcrumb : 'View' , right : 'base.framework.category.view' , mode : CmdbMode . View } , component : CategoryViewComponent } , { path : 'add' , data : { breadcrumb : 'Add' , right : 'base.framework.category.add' } , component : CategoryAddComponent } , { path : 'edit' , data : { breadcrumb : 'Edit' , right : 'base.framework.category.edit' , mode : CmdbMode . Edit } , component : CategoryComponent } , { path : 'edit/:publicID' , data : { breadcrumb : 'Edit' , right : 'base.framework.category.edit' , mode : CmdbMode . Edit } , component : CategoryEditComponent } ] ; @ NgModule ( { imports : [ RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] } ) export class CategoryRoutingModule { }