I have a page for editing user, it has some children components inside. Each children components can change or doing some effect to its parent component.
So instead of emitting the changes to parent and updating some fields, I did a "reload" of the current page with
private route: ActivatedRoute;
reload(){
this.router.navigate(["/admin/user/edit/"+this.user.id]);
}
Basically, it redirects to the current page. For example, the current page is http://web.info/admin/user/edit/9 it will be redirected to this page with the hope all the data inside that page reloaded with the newest data.
but it seems the angular won't redirect/reload the same page with the router.navigate
How I should reload a current page?
Edit:
Here is the reason why I need to reload the page instead of manually updating the data on the current page. I need to do updates on Other Component, when I did the update it will add something to History Component. I need to refresh the User Component and History Component together since both components affected by the changes in Other Component.
window.location.href = '...';
– Kopeck