angularjs - Angular hide left from specific page -
my button code
<button class="button button-icon button-clear ion-navicon" ng-click="showmenu()" ng-hide="showleftmenu"></button>
navigation controller
.controller('navctrl', ['$http',function($scope, $ionicsidemenudelegate) { $scope.showmenu = function () { $ionicsidemenudelegate.toggleleft(); }; $scope.showrightmenu = function () { $ionicsidemenudelegate.toggleright(); }; $scope.showleftmenu = false; }])
i want hide left nav controller. when goes specific tabs contact us.
.controller('contacttabctrl', function($scope) { $scope.showleftmenu = true; });
i tried main controller
.controller('mainctrl', function($scope) { $scope.showleftmenu = true; })
when goes contact page, still left menu values taken main controller not contact controller
thanks all
if 'mainctrl' parent controller, in child controllers try using :
$scope.$parent.showleftmenu = false;
Comments
Post a Comment