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?
-- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
