I have the below routes:
export const appRoutes: Routes = [
{
path: '',
data: { breadcrumb: 'Parent' , rootRoute : true },
children: [
{
path:'', component: ComponentA,
pathMatch: 'full',
},
{
path:'details/:id', component: ComponentDetails,
pathMatch: 'full',
data: { breadcrumb: 'Details Page' , rootRoute : false },
},
]
}
];
When I go deeper into nested child routes and lets say, I want to go back to my parent using a custom defined back-button in my app, for which I need to determine the parent route( not previous route) when I'm at a child route. How can this be achieved?
What I have tried?
Angular 2 get parent activated route
Angular version : 12.x