import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { TypeAddComponent } from './type-add/type-add.component' ; import { TypeEditComponent } from './type-edit/type-edit.component' ; import { TypeDeleteComponent } from './type-delete/type-delete.component' ; import { TypeComponent } from './type.component' ; import { TypeResolver } from '../resolvers/type-resolver.service' ; import { UserSettingsResolver } from '../../management/user-settings/resolvers/user-settings-resolver.service' ; const routes = [ { path : '' , pathMatch : 'full' , data : { breadcrumb : '' , right : 'base.framework.type.view' } , resolve : { userSetting : UserSettingsResolver } , component : TypeComponent } , { path : 'add' , data : { breadcrumb : 'Add' , right : 'base.framework.type.add' } , component : TypeAddComponent } , { path : 'edit/:typeID' , data : { breadcrumb : 'Edit' , right : 'base.framework.type.edit' , } , resolve : { type : TypeResolver } , component : TypeEditComponent } , { path : 'delete/:publicID' , data : { breadcrumb : 'Delete' , right : 'base.framework.type.delete' } , component : TypeDeleteComponent } ] ; @ NgModule ( { imports : [ RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] } ) export class TypeRoutingModule { }