My Problem is that I can't get some parameters from a url path with a child.
So in my Code I have a parent component with some stuff and a nav-mat-tab followed by this tutorial. It works fine but if I'm on a tab url I can't get the id of the url.
Example:
http://localhost:4200/parent/1 --> id = 1
http://localhost:4200/parent/1/child1 --> id = null
http://localhost:4200/parent/1/child3/2 --> id = null, t_id = null
this.route.paramMap.subscribe(
params => console.log(params.get('id'))
);
export const appRoutes: Routes = [
{
path: 'parent/:id', component: ParentComponent,
children: [
{ path: 'tab1', component: Tab1Component },
{ path: 'tab2', component: Tab2Component },
{
path: 'tab3', component: Tab3Component,
children: [
{ path: ':t_id', component: Tab3ChildComponent },
],
},
],
},
];