In my angular application routing is implemented as in following example.
User must have Permission1 permission to open parent component page, and Permission1 and Permission2 to view child component. How can I open SecondComponent in view mode without having parent component permission? If that is not possible how can I make new route for viewing SecondComponent without having Permission1?
{
path: ':userId', component: MainComponent,
data: {
permissions: [Permission1] },
canActivate: [AuthGuard],
children: [
{ path: '', component: FirstComponent,
data: { reuseRoute: true} },
{ path: 'second', component: SecondComponent,
data: {
actionType: ActionType.Edit,
permissions: [Permission2] },
canActivate: [AuthGuard] },
{ path: 'second-view/:id', component: SecondComponent,
data: {
actionType: ActionType.View,
permissions: [Permission2] },
canActivate: [AuthGuard, OverviewGuard] }}]```