Reputation: 855
this.router.navigate(['CurrentComponent', {id: this._id, param1: value}]);
Above code updates the query parameters of the present url. And after the url is changed, the component loads again. How to prevent the reload of component and only update the query parameters ?
Upvotes: 2
Views: 641
Reputation: 657078
Add a method routerCanReuse
to your component and return true
routerCanReuse(next: ComponentInstruction, prev: ComponentInstruction) { return true; }
See also CanReuse
Upvotes: 1