1

I would like to have a dynamic route like /parent/:id beside other /parent/child.

I tried something like this with no success:

export const routes: RouterConfig = [ { path: '', component: HomeComponent }, { path: 'parent', component: ParentComponent,canActivate: [ WebpackAsyncRoute ], children: [ { path: ':id', component: 'ParamComponent' }, { path: 'child', component: 'ChildComponent' }, { path: 'anotherchild', component: 'AnotherChildComponent' } ] } ];

sebap
  • 1,601
  • 5
  • 24
  • 41

1 Answers1

0

Answer is Yes. The problem was I didn't add the :id path on the route config defined on the component (as I'm using WebpackAsyncRoute). so nothing related to the wildcard path

sebap
  • 1,601
  • 5
  • 24
  • 41