Hi Dawg,

Remeber your controller runs during init only, it doesn't get reevaluated. 
The correct way to handle login is through a service. In that service, you 
can create an observable that pushes login state changes to where ever you 
need them.
steps to take:


   1. create an auth service. this handles all business logic for auth 
   (like saving it to localStorage etc..)
   2. make sure there is an observable in that service, that pushes state 
   changes
   3. subscribe to it wherever you need it, in this case in your navBar 
   controller.

Hope this helps you a bit.
Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" 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.

Reply via email to