So in angular I've nested routing, lets say:
domain.com/dashboard/list/:listId/:listName/details/:detailsName/:detailsId
Dashboard is separate module
List is separate module
Details is separate module
Now, on details page, I've also small component with similar to list that I've on list page, and thats way I want also redirect user to the same details component but with different parameters.
So let's from :
domain.com/dashboard/list/1/test_list_name/details/test_details_name/4
to
domain.com/dashboard/list/1/test_list_name/details/another_test_details_name/8
RouterLink:
<h5 [routerLink]="['details', id, name]"></h5>
Unfortunately I'm always redirected to /dashboard. I tried it also with setting routeReuseStrategy to false. But without success.
What I'm doing wrong?
@Edit, stackblitz:
https://stackblitz.com/edit/angular-q8fasa
In stackblitz example I just want to open another dashboard-second component(with different parameters) from dashboard-second component. In this example I've used only one nested routing, but issues is exactly same.
Sorry for quite ugly example, but I believe you will understand my problem.
RouterModule.forRoot(routes, { enableTracing: true })and look at what is in the console. I suspect it's trying to accessdetails/detailsand you might have to change your router link to<h5 [routerLink]="['../details', id, name]"></h5>