I am using Angular 4, and this is my code in one of the component where I need to catch that route has changed and reload the page.
ngOnInit() {
this.router.events.subscribe((value) => {
if (value instanceof NavigationEnd) {
console.log(value);
}
});
}
My problem is that I get multiple 'NavigationEnd' events for one route. For some route console.log write even 6,7 values.
How that can happen ?