1

I have 2 page who use the same template, I want to reload the template when I go from the page2 to page1 by using this._router.navigate(). the page2 use the page1 as a directive,

I want to do that let link = "/contrat/" + num

this._router.navigate(link)

and be equivalent to a window.location.href

I want to force the template to reload. thank's

imtah
  • 409
  • 1
  • 6
  • 16

1 Answers1

1

This question is a little confusing but it looks like you syntax may be wrong. It should look something like this...

this.router.navigate(['page2']);

and make sure you define that path within a RouterConfig, for example

{path: 'page2', component: page2Component},
Bean0341
  • 1,632
  • 2
  • 17
  • 37