57 lines
1.7 KiB
TypeScript
57 lines
1.7 KiB
TypeScript
import {NgModule} from '@angular/core'
|
|
import {Routes, RouterModule} from '@angular/router'
|
|
import {CatalogComponent} from './pages/catalog/catalog.component'
|
|
import {AdministrationComponent} from './pages/administration/administration.component'
|
|
|
|
|
|
const routes: Routes = [{
|
|
path: 'color',
|
|
loadChildren: () => import('./modules/colors/colors.module').then(m => m.ColorsModule)
|
|
}, {
|
|
path: 'account',
|
|
loadChildren: () => import('./modules/accounts/accounts.module').then(m => m.AccountsModule)
|
|
}, {
|
|
path: 'catalog',
|
|
component: CatalogComponent,
|
|
children: [{
|
|
path: 'materialtype',
|
|
loadChildren: () => import('./modules/material-type/material-type.module').then(m => m.MaterialTypeModule),
|
|
}, {
|
|
path: 'material',
|
|
loadChildren: () => import('./modules/material/material.module').then(m => m.MaterialModule)
|
|
}, {
|
|
path: 'company',
|
|
loadChildren: () => import('./modules/company/company.module').then(m => m.CompanyModule)
|
|
}, {
|
|
path: '',
|
|
pathMatch: 'full',
|
|
redirectTo: 'materialtype'
|
|
}]
|
|
}, {
|
|
path: 'admin',
|
|
component: AdministrationComponent,
|
|
children: [
|
|
{
|
|
path: 'user',
|
|
loadChildren: () => import('./modules/users/user.module').then(m => m.UserModule)
|
|
}, {
|
|
path: 'group',
|
|
loadChildren: () => import('./modules/groups/group.module').then(m => m.GroupModule)
|
|
}, {
|
|
path: '',
|
|
pathMatch: 'full',
|
|
redirectTo: 'user'
|
|
}
|
|
]
|
|
}, {
|
|
path: 'material',
|
|
loadChildren: () => import('./modules/material/material.module').then(m => m.MaterialModule)
|
|
}]
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes, {relativeLinkResolution: 'legacy'})],
|
|
exports: [RouterModule]
|
|
})
|
|
export class AppRoutingModule {
|
|
}
|