Hi,
I’m currently trying to make a tab app using ionic.
I want to hide a tab based on a variable inside a controller.
I saw the hidden property and set it to an hardcoded true and it works, however It doesn’t work when trying to use the controller variable. Same with the angular ng-hide and ng-show attributes.
my code :
My controller :
.controller('AuthCtrl', function($scope) {
$scope.isLoggedIn = true;
})
my html file :
<ion-tabs ng-controller="AuthCtrl as auth" class="tabs-icon-top tabs-color-active-positive" >
<p>{{isLoggedIn}}</p>
<ion-tab title="Login" icon-off="ion-gear-a" icon-on="ion-gear-a" href="#/tab/login" ng-hide="isLoggedIn" hidden="isLoggedIn">
<ion-nav-view name="tab-login" ></ion-nav-view>
</ion-tab>
</ion-tabs>
Note : the display of the var is correct and show true.
Can you see what my problem is ?
Thank you.
Valentin