2

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 ?

Scipion
  • 10,555
  • 15
  • 66
  • 125
  • this might help: http://stackoverflow.com/questions/38036498/angular2-router3-cant-reload-refresh-active-route – Riv Nov 29 '16 at 14:55

1 Answers1

-1

use router.navigateByUrl instead

can get url with

ngOnInit() {
      this.sub = this.route.params.subscribe(params => {
         this.paramsChanged(params['id']);
       });
    }
anshuVersatile
  • 1,934
  • 1
  • 10
  • 17