In Angular 2, you can specify a @CanActivate annotation for a component where you can determine if the component should be activated or not. The reason it\'s no
I don't know if its the best way, but these guys do it by extending and using its own and override the CanActivate method:
https://auth0.com/blog/2015/05/14/creating-your-first-real-world-angular-2-app-from-authentication-to-calling-an-api-and-everything-in-between/
Also you could use routerOnActivate instead.
https://angular.io/docs/js/latest/api/router/OnActivate-interface.html I hope this helps.