У меня есть несколько дочерних компонентов, которые совместно используют один и тот же компонент, который работает нормально, однако я не могу маршрутизировать между страницами, поскольку кажется, что Angular подозревает, что компонент уже загружен. Можно ли перезагрузить компонент при попытке маршрутизации к этим дочерним маршрутам?
const ServicesRouting: ModuleWithProviders = RouterModule.forChild([
{
path: '',
component: StructureComponent,
canActivate: [AuthGuard],
children: [
{
path: 'services',
canActivate: [AuthGuard],
component: servicesComponent,
children: [
{
path: 'one',
canActivate: [AuthGuard],
component: servicesComponent,
},
{
path: 'two',
canActivate: [AuthGuard],
component: servicesComponent,
},
{
path: 'three',
canActivate: [AuthGuard],
component: servicesComponent,
},
{
path: 'four',
canActivate: [AuthGuard],
component: servicesComponent,
}
]
}
]
}
]);