0

i have a side-menu and i want to change the item of this side

eg: if user is connect ==> item my account is show

but if user is not connect ==>item my account is hide

in my controller:

facebookExample.controller("accueilController", function($scope, $cordovaOauth, $localStorage, $location,$ionicPopup,$state,$http) {

$scope.connect=true;
$localStorage.connect=true;

in the index.html :

<body ng-app="starter" ng-controller="accueilController" >
    <ion-item class="item" nav-clear menu-close href="#/login" ng-show="connect=='true'">
                             <i class="fa fa-user" style="padding-right: 190px;"></i> <div style="padding-left: 25px;padding-top: 5px;">My account  </div>                   
                            </ion-item>

i found nothing ,what can i do ,i use ng-if or ng-how and how ??

help me please

Rim Bejaoui
  • 329
  • 6
  • 30
  • did u tried..ur last question's [ans](http://stackoverflow.com/a/34459188/4302328)..!and [this](http://codepen.io/sagarchaudhari/pen/OMRjrz?editors=001)..!its same..kind! – the_mahasagar Dec 29 '15 at 15:47

1 Answers1

0

Try removing that check in the ng-show

<body ng-app="starter" ng-controller="accueilController" >
<ion-item class="item" nav-clear menu-close href="#/login" ng-show="connect">
  <i class="fa fa-user" style="padding-right: 190px;"></i>
  <div style="padding-left: 25px;padding-top: 5px;">My account</div>                   
</ion-item>
HyLian
  • 4,999
  • 5
  • 33
  • 40