I am looking to detect a route change in my AppComponent.
AppComponent
Thereafter I will check the global user token to see if he is logged in. Then I can redirect t
I would write something like this:
ngOnInit() { this.routed = this.router.events.map( event => event instanceof NavigationStart ) .subscribe(() => { } ); } ngOnDestroy() { this.routed.unsubscribe(); }