53 lines
1.5 KiB
TypeScript
53 lines
1.5 KiB
TypeScript
|
|
import { Routes } from '@angular/router';
|
||
|
|
import { ProjectsDashboardComponent } from './pages/projects-dashboard/projects-dashboard.component';
|
||
|
|
import { ProjectViewComponent } from './pages/project-view/project-view.component';
|
||
|
|
import { CategoryEditorComponent } from './pages/category-editor/category-editor.component';
|
||
|
|
import { SubcategoryEditorComponent } from './pages/subcategory-editor/subcategory-editor.component';
|
||
|
|
import { ItemsListComponent } from './pages/items-list/items-list.component';
|
||
|
|
import { ItemEditorComponent } from './pages/item-editor/item-editor.component';
|
||
|
|
|
||
|
|
export const routes: Routes = [
|
||
|
|
{
|
||
|
|
path: '',
|
||
|
|
component: ProjectsDashboardComponent
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: 'project/:projectId',
|
||
|
|
component: ProjectViewComponent,
|
||
|
|
children: [
|
||
|
|
{
|
||
|
|
path: 'category/:categoryId',
|
||
|
|
component: CategoryEditorComponent
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: 'subcategory/:subcategoryId',
|
||
|
|
component: SubcategoryEditorComponent
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: 'items/:subcategoryId',
|
||
|
|
component: ItemsListComponent
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: 'item/:itemId',
|
||
|
|
component: ItemEditorComponent
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: 'category/:categoryId',
|
||
|
|
component: CategoryEditorComponent
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: 'subcategory/:subcategoryId',
|
||
|
|
component: SubcategoryEditorComponent
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: 'items/:subcategoryId',
|
||
|
|
component: ItemsListComponent
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: 'item/:itemId',
|
||
|
|
component: ItemEditorComponent
|
||
|
|
}
|
||
|
|
];
|