import { NgModule } from '@angular/core' ; import { Routes , RouterModule } from '@angular/router' ; import { GroupsComponent } from './groups.component' ; import { GroupAddComponent } from './group-add/group-add.component' ; import { GroupEditComponent } from './group-edit/group-edit.component' ; import { GroupResolver , GroupsResolver } from '../resolvers/group-resolver.service' ; import { RightsResolver } from '../resolvers/rights-resolver.service' ; import { GroupDeleteComponent } from './group-delete/group-delete.component' ; import { PermissionGuard } from '../../auth/guards/permission.guard' ; import { GroupAclComponent } from './group-acl/group-acl.component' ; import { UserSettingsResolver } from '../user-settings/resolvers/user-settings-resolver.service' ; const routes = [ { path : '' , pathMatch : 'full' , data : { breadcrumb : 'List' , right : 'base.user-management.group.view' } , resolve : { userSetting : UserSettingsResolver } , component : GroupsComponent } , { path : 'add' , data : { breadcrumb : 'Add' , right : 'base.user-management.group.add' } , resolve : { rights : RightsResolver } , component : GroupAddComponent } , { path : 'edit/:publicID' , data : { breadcrumb : 'Edit' , right : 'base.user-management.group.edit' } , resolve : { group : GroupResolver , rights : RightsResolver } , component : GroupEditComponent } , { path : 'delete/:publicID' , data : { breadcrumb : 'Delete' , right : 'base.user-management.group.delete' } , resolve : { group : GroupResolver , groups : GroupsResolver } , component : GroupDeleteComponent } , { path : 'acl' , canActivateChild : [ PermissionGuard ] , data : { breadcrumb : 'Access Control List' , right : 'base.framework.type.view' } , component : GroupAclComponent } ] ; @ NgModule ( { imports : [ RouterModule . forChild ( routes ) ] , exports : [ RouterModule ] } ) export class GroupsRoutingModule { }