import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { ObjectViewComponent } from './object-view/object-view.component' ; import { ObjectAddComponent } from './object-add/object-add.component' ; import { ObjectEditComponent } from './object-edit/object-edit.component' ; import { ObjectCopyComponent } from './object-copy/object-copy.component' ; import { ObjectLogComponent } from './object-log/object-log.component' ; import { ObjectBulkChangeComponent } from './object-bulk-change/object-bulk-change.component' ; import { TypeResolver } from '../resolvers/type-resolver.service' ; import { ObjectsByTypeComponent } from './objects-by-type/objects-by-type.component' ; import { ObjectViewResolver } from '../resolvers/object-view-resolver.service' ; import { UserSettingsResolver } from '../../management/user-settings/resolvers/user-settings-resolver.service' ; import { ObjectComponent } from './object.component' ; const routes = [ { path : '' , pathMatch : 'full' , data : { breadcrumb : 'Object List' , right : 'base.framework.object.view' } , component : ObjectComponent } , { path : 'add' , data : { breadcrumb : 'New' , right : 'base.framework.object.add' } , component : ObjectAddComponent } , { path : 'add/:publicID' , data : { breadcrumb : 'Add' , right : 'base.framework.object.add' } , component : ObjectAddComponent } , { path : 'edit/:publicID' , data : { breadcrumb : 'Edit' , right : 'base.framework.object.edit' } , component : ObjectEditComponent } , { path : 'copy/:publicID' , data : { breadcrumb : 'Copy' , right : 'base.framework.object.add' } , component : ObjectCopyComponent } , { path : 'change' , data : { breadcrumb : 'Bulk change' , right : 'base.framework.object.*' } , component : ObjectBulkChangeComponent } , { path : 'type/:typeID' , data : { breadcrumb : 'Object Type List' , right : 'base.framework.object.view' } , resolve : { type : TypeResolver , userSetting : UserSettingsResolver } , component : ObjectsByTypeComponent , } , { path : 'view/:publicID' , data : { breadcrumb : 'View' , right : 'base.framework.object.view' } , resolve : { userSetting : UserSettingsResolver , object : ObjectViewResolver , } , component : ObjectViewComponent } , { path : 'log/:publicID' , data : { breadcrumb : 'View Log' , right : 'base.framework.object.view' } , component : ObjectLogComponent } ] ; @ NgModule ( { imports : [ RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] } ) export class ObjectRoutingModule { }