Выходит у меня есть модуль (NgModule) и у этого модуля есть роуты (Routes). Находясь в одном из компоненте этого модуля модно ли получить конфигы всех роутов модуля?
Вот это:
const routes: Routes = [
{
path: '',
children: [
{
path: '',
component: SntComponent
},
{
path: 'new',
component: SntCreateComponent,
canActivate: [CheckRoleGuard],
data: {
roles: [RoleType.SntOperator, RoleType.SntReadOnly]
}
},
{
path: 'edit/:id',
component: SntEditComponent,
canActivate: [UserGuard, SntoperatorGuard]
},
{
path: 'show/:id',
component: SntShowComponent,
canActivate: [UserGuard,SntoperatorGuard]
},
{
path: 'correction/:id',
component: SntCorrectionComponent,
canActivate: [SntoperatorGuard]
}
]
}
]