38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
|
import {RouterModule, Routes} from '@angular/router';
|
||
|
import {ModuleWithProviders} from '@angular/core';
|
||
|
import {AdminComponent} from './admin.component';
|
||
|
import {AppUserListComponent} from './user-list/app-user-list.component';
|
||
|
import {EditAppUserComponent} from './edit-app-user/edit-app-user.component';
|
||
|
import {AppUserItemComponent} from './user-list/app-user-item.component';
|
||
|
|
||
|
export const adminRoutes: Routes = [
|
||
|
{
|
||
|
path: 'users',
|
||
|
children: [
|
||
|
{
|
||
|
path: '',
|
||
|
component: AdminComponent,
|
||
|
outlet: 'left',
|
||
|
children: [{
|
||
|
path: '',
|
||
|
component: AppUserListComponent
|
||
|
}]
|
||
|
},
|
||
|
{
|
||
|
path: 'new',
|
||
|
component: EditAppUserComponent,
|
||
|
outlet: 'right'
|
||
|
},
|
||
|
{
|
||
|
path: 'edit/:id',
|
||
|
component: EditAppUserComponent,
|
||
|
outlet: 'right'
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
];
|
||
|
|
||
|
export const adminRouterModule: ModuleWithProviders = RouterModule.forChild(adminRoutes);
|
||
|
|
||
|
export const adminRoutingComponents = [AdminComponent, AppUserListComponent, AppUserItemComponent, EditAppUserComponent];
|