I am new to angularjs and encountered a problem which required me to change the value of ng-show="false"
to ng-show="true"
when the user is redirected to the home page
after successfully logging in!
This is what I am attempting to achieve:
.controller('loginCtrl', function ($scope, ..., showmenu)
{
$scope.dropdown = showmenu.hide;
....
}
.factory('showmenu', function() {
return {
show : 'true',
hide : 'false'
}
})
index.html
<div class="btn-group" dropdown="" ng-show="false">
<button type="button" class="btn btn-danger">Kyle Thomas</button>
<button type="button" class="btn btn-danger dropdown-toggle">
<span class="caret"></span> <span class="sr-only">Split
button!</span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="#/profile">Profile</a></li>
<li><a href="#/setting">Setting</a></li>
<li><a href="#/help">Help</a></li>
<li class="divider"></li>
<li><a href="#/login">Logout</a></li>
</ul>
</div>
This dropdown should be visible upon redirection to home.html!!
Thank you