Enable / disable side menu


#1

Hi there,

I want to disable / enable left or right side menu on some view.

I try to put an angular boolean in the menu template :

<ion-side-menu side="right" is-enabled="enableRightSideMenu">  // or is-enabled="{{enableRightSideMenu}}" 
  <ion-header-bar class="bar-stable">
    <h1 class="title">Left</ h1>
  </ion-header-bar>
</ion-side-menu>

But it doesn’t work when I change the value of my boolean in the constructor page :confused:


#2

Can I have some help plz ?


#3

Here is a codepen example where I am disabling the side menu on page 2 (and also hiding the menu icon) and then enabling it again once leaving page 2: http://codepen.io/brandyshea/pen/mJrGWB?editors=101


#4

Thank you ! In fact it’s working with $rootScope only and not $scope.
Does anyone know why ?