I'm trying to setup angular route with nested path.
parent page is /list child page is /list/:id
for some reason, the following route doesnt work. if I navigate to /list/:id, the route is found, but it loads ListComponent instead of ViewComponent
{
path: 'list',
component: ListComponent,
children: [
{
path: ':id',
component: ViewComponent
}
]
}
I'm pretty sure this is the same setup as the example in angular doc. am I missing something?
the following works, but it has the wrong hierarchy, /list is siblings to /list/:id
{
path: 'list',
children: [
{
path: '',
component: ListComponent
},
{
path: ':id',
component: ViewComponent
}
]
}