I am stuck at hiding and showing the login and logout buttons at the 
navbar. I am setting some cookies at LoginCtrl which belongs to login.html. 
When user logged in I am assigning rootscope to some variables which that 
variable assing to ngshow/hide in  And getting those cookies in HomeCtrl. I 
created a plunker but plunker does not work i expected. I think cookies 
does not work on plnker. What i want to achieve is when I click log in 
button in the login.html Login element at the nav bar has to be gone and 
Username element has be to show.  In plunker when I add some nested states 
like my local and result is the same. But when i remove the nested 
structure and add simple two state its start working.

Working Case:

.state('home', { 
templateUrl:'home.html', ===>stores the navbar html
controller: 'HomeCtrl'
})

.state('login', {
templateUrl:'login.html',
controller:'LoginCtrl'
})

Not working case: 
.state('home', { 
templateUrl:'home.html, ===>stores the navbar html
controller: 'HomeCtrl'})

.state('home.login', {
templateUrl:'home.login.html',
controller:'LoginCtrl'})

Here is plunker  created:http://plnkr.co/edit/tZuvyrAUD0yCN8a3K5lF

-- 
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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to