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
Angular 8. Check whether the current route is the base route.
baseroute: boolean; constructor( private router: Router, ) { router.events.subscribe((val: any) => { if (val.url == "/") { this.baseroute = true; } else { this.baseroute = false; } }); }