I am trying to set the ng-show variable isloggedout with the cookie Value, which is working (therefore the $scope.isloggedout is either true or false) which should trigger the ng-show or ng-hide which is clearly not working.
My App controller:
app.controller('projectCtrl', ['$scope', '$http', '$location', '$cookies', '$cookieStore', '$window',
function($scope, $http ,$location,$cookies,$cookieStore,$windows) {
$scope.isloggedout = $cookieStore.get('value');
}]);
My HTML:
<html ng-app="rjtApp" ng-controller="projectCtrl">
<div >
<ul class="nav navbar-nav navbar-right" >
<li><a href="#Signout" >Login <span class="glyphicon glyphicon-user" ng-show="isloggedout"></span></a></li>
<li><a href="#Login" >LogOut <span class="glyphicon glyphicon-user" ng-show="!isloggedout"></span></a></li></ul>
</div>
</html>
any help?