I think you donβt have another <router-view></router-view> ProjectDetails inside ProjectDetails , add this and try.
Also remove /projects/:projectId from the entire child path, as you are already in the parent path path: '/projects/:id',
So the final route will be
routes: [ { path: '/', component: Dashboard }, { path: '/projects', component: Projects }, { path: '/projects/:id', component: ProjectDetails, children : [ // DEALS { path: 'deals/:dealId/details',//path will be /projects/:projectId/deals/:dealId/details component: DealDetails }, { path: 'deals',.// path will be /projects/:projectId/deals component: Deals }, // COMMITMENTS { path: '/deals/:dealId/commitments/:commitmentId/edit/', component: CommitmentEdit } ] } ]
The fiddle works here: https://jsfiddle.net/chyLjpv0/16/
Read more about child path .
If you donβt need it, and the component depends on the parent, do not do it like using children directly as the root path, for example
routes: [ { path: '/', component: Dashboard }, { path: '/projects', component: Projects }, { path: '/projects/:id', component: ProjectDetails, }, // DEALS { path: '/projects/:projectId/deals/:dealId/details', component: DealDetails }, { path: '/projects/:projectId/deals', component: Deals }, // COMMITMENTS { path: '/projects/:projectId/deals/:dealId/commitments/:commitmentId/edit/', component: CommitmentEdit } ]
Working fiddle for this: https://jsfiddle.net/chyLjpv0/17/
The router-link-exact-active class already works in this example: https://jsfiddle.net/chyLjpv0/18/ to display the link as active
In your edit
Why do you put <router-view> inside <router-view> . Outer only works on replacement, and the internal <router-view> useless. Use <router-view> in the parent component for the child component.
Also your internal <router-view> not properly closed as </router-view>