Hi,
I would like to have an optional sidebar (on the right) for a page.
My main navigation is in a left sidebar (in a parent view).
They way i’m doing it now is with an <div ui-view='sidebar'>
on the parent view. And if a page needs a sidebar on the right I include a extra view in my routes. Only when I open the optional (right) sidebar on a page I’ts also available on all the pages. Probably there’s something wrong with my implementation. Anyone has any suggestions on this?
Thanks
I would normally suggest using the “drag-content” attribute to avoid displaying the side menu. Unfortunately, that works across the board; so, you’re left side-menu would not be accessible either.
You can try something like I’ve done here. http://codepen.io/calendee/pen/mjtJL?editors=101
It does “hide” the right side menu content, but it does not prevent it from being opened. Less than ideal.
Your alternative is to have another ion-nav-view
that does not include the right side menu at all or implement a directive for this view that doesn’t allow a drag-right gesture.
UPDATE : I just discovered is-enabled
.
So, see the updated CodePen. It disables the right hand side menu just fine.
Codepen Sample : http://codepen.io/calendee/pen/mjtJL
http://ionicframework.com/docs/api/directive/ionSideMenu/
2 Likes
Exactly what I was looking for. Big thanks