I have built some basic authentication security into angular2 app using routes.
From a login page I set a boolean in a class that is injected into the routed components.
When the route changes, the routerOnActivate method in the routed component looks at that class for a isLoggedIn boolean that will route the user back to the login view if false.
It works <happy-sounds>great </happy-sounds>, but it seems a waste not to use the @CanActivate decorator.
Anyone out there know how to inject that login class into @CanActivate?