NB. I\'ve got a set of resulting from googling but, as I explain at the end, I sense that they aren\'t reliable, due to diversity.
I have two utility method
ok this next example works for me without reload the page:
on router component you have tu add 'onSameUrlNavigation' router.component:
@NgModule({
imports: [RouterModule.forRoot(routes, { onSameUrlNavigation: 'reload' })],
exports: [RouterModule],
})
now component you want reload
constructor(private router: Router){
this.router.routeReuseStrategy.shouldReuseRoute = () => {
return false;
};
}
someFunction(){
this.router.navigateByUrl('/route');
}