Disabling a side menu


#1

I have an app that uses a left side menu throughout the app, and a right side menu conditionally. The right is rendered in a named directive that only loads in one state assuming proper permissions. I’m also using the side-menu’s is-enabled attribute with a $rootScope variable.

I have the variable being set to false on each $stateChangeStart, and being overridden on the appropriate parent state. This works except when I navigate away from the state that uses the right side bar, i can still drag the content as if I were viewing the right side menu, but it instead shows the left side menu.

I’m wondering if this is a bug or if there is another way I should be doing this.

Thanks!
Dustin


#2

Not sure if this is any help at all, but what I’ve been doing to have different menu layouts (left, right, both) is have parent state for each menu layout and swap in the child states to the parent on ng-click hey presto the menu sides change on “some condition”… Not sure that’s totally what you’re after tho…


#3

Thanks for the input. I seemed to have solved it by changing the ui-view tag to ion-nav-view and putting it as a child of the ion-side-menu object. Cheers.


#4

Try looking here…


#5

I just discovered a way to do this today for another forum post.

Use the is-enabled attribute.


#6

Apparently this does not work with the new release candidate rc4, any idea what was changed that made this stop working