I have this in my .routing.ts file
export const routing = RouterModule.forChild([
{
path: \'page/:id\',
component: PageComponent
}]);
I have used the following and it worked.
onButtonClick() {
this.router.routeReuseStrategy.shouldReuseRoute = function () {
return false;
}
this.router.onSameUrlNavigation = 'reload';
this.router.navigate('/myroute', { queryParams: { index: 1 } });
}
In addition it also works for path params.