Disable side menu conditionally

I want to show side menu only when user logged in, is there a way I can conditionally enable or disable the slide menu?
I am doing this “”, this works when user not logged in and after logged, But when user logged out the menu still slide in (which should not be), and the menu content id blank…

Any idea?

Use the drag-content attribute.


In a controller, you can change the value of the boolean.

$scope.allowSideMenu = false;

VERY old sample : http://plnkr.co/edit/WZFRfSfV2zVt1igpC3jY?p=preview


FYI : Now see is-enabled

Sample : http://codepen.io/calendee/pen/mjtJL

1 Like

But this disabled the sidemenu swipe gesture on all other pages. Only way I am able to access the sidemenu is by toggling.

That was the intent. Using this gives you the ability to decide what pages the side menu works on.

FYI : Lots of changes to side menus in the nightlies and the upcoming Beta 14. Might want to check those out as well.