I have noticed that using :
router.navigate(['my-route'])
doesn't work if I am already on 'my-route'
However, I am looking to refresh the component if I am already on the its route.
What's the best way to achieve this ?
I have noticed that using :
router.navigate(['my-route'])
doesn't work if I am already on 'my-route'
However, I am looking to refresh the component if I am already on the its route.
What's the best way to achieve this ?
use router.navigateByUrl
instead
can get url with
ngOnInit() {
this.sub = this.route.params.subscribe(params => {
this.paramsChanged(params['id']);
});
}