Answer the question
In order to leave comments, you need to log in
How to hide routing parent in angular?
Good day everyone. I have a routing scheme:
const routes: Routes = [
{ path: '', component: RegularComponent },
{ path: 'crm', component: LoginComponent ,
children: [
{ path: 'newlead', component: NewLeadComponent, canActivate: [AuthGuard] },
{ path: 'leadlist', component: LeadListComponent, canActivate: [AuthGuard],
children: [
{ path: ':id', component: LeadPageComponent, canActivate: [AuthGuard] },
]
},
]},
];
<router-outlet></router-outlet>
Answer the question
In order to leave comments, you need to log in
Subscribe to activatedRouter, check it out and set the hide flag. Well, the content in the parent under ngIf.
But if such a need arose, most likely you are doing something architecturally wrong.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question