34 lines
953 B
TypeScript
34 lines
953 B
TypeScript
import {RouterModule, Routes} from '@angular/router';
|
|
import {EditUserComponent} from './edit-user/edit-user.component';
|
|
import {UserListComponent} from './user-list/user-list.component';
|
|
import {AwardUserComponent} from './award-user/award-user.component';
|
|
import {ModuleWithProviders} from '@angular/core';
|
|
import {UserItemComponent} from './user-list/user-item.component';
|
|
|
|
export const usersRoutes: Routes = [
|
|
{
|
|
path: '',
|
|
component: UserListComponent,
|
|
outlet: 'left'
|
|
},
|
|
{
|
|
path: 'new',
|
|
component: EditUserComponent,
|
|
outlet: 'right'
|
|
},
|
|
{
|
|
path: 'edit/:id',
|
|
component: EditUserComponent,
|
|
outlet: 'right'
|
|
},
|
|
{
|
|
path: 'award/:id',
|
|
component: AwardUserComponent,
|
|
outlet: 'right'
|
|
}
|
|
];
|
|
|
|
export const usersRouterModule: ModuleWithProviders = RouterModule.forChild(usersRoutes);
|
|
|
|
export const usersRoutingComponents = [UserItemComponent, UserListComponent, EditUserComponent, AwardUserComponent];
|