I have a notification module ,in that module i should redirect user to other pages for showing notification detail .
I have a problem with this :
when i enter this route payment/detail/1254 for first time , every thing is ok , but then i need to change route to this for show other notification detail payment/detail/8547 , the route changes , but the page not change not show me previous detail .
i know i can use this code in every component i need :
router.events.subscribe((val) => {
// see also
console.log(val instanceof NavigationEnd)
});
but i have a more than 40 modules . i want use the this code in common place , i need write this code or same code in the common place and I do not have this problem every time the route changes.
how can i solve this problem ???