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
  • 11,449
  • 19
  • 74
  • 139
  • 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
  • 2,030
  • 1
  • 11
  • 18