38 lines
1.0 KiB
TypeScript
38 lines
1.0 KiB
TypeScript
import {RouterModule, Routes} from "@angular/router";
|
|
import {UsersComponent} from "./users.component";
|
|
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: UsersComponent,
|
|
children: [
|
|
{
|
|
path: '',
|
|
component: UserListComponent
|
|
}
|
|
]
|
|
},
|
|
{
|
|
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, UsersComponent, UserListComponent, EditUserComponent, AwardUserComponent];
|