It seems router.changes.subscribe
is deprecated.
What can be used in place of this?
I want to do something on each router changes, so please provide me help what could be done as router.
It seems router.changes.subscribe
is deprecated.
What can be used in place of this?
I want to do something on each router changes, so please provide me help what could be done as router.
I have got this solution.
router.events.subscribe(event:Event => {
if(event instanceof NavigationStart) {
}
// NavigationEnd
// NavigationCancel
// NavigationError
// RoutesRecognized
}