I saw that - I added the noDragRight directive, but you can still drag the title bar in that Plunker. I think the now built-in Ionic drag-content="false" would work if it allowed an angular scope expression other than true/false. That way each controller could set it manually.
I’ll have to dig into the gestures code to see if I can grab the event somewhere and kill (and re-enable) it, but it would be nice if this was a feature.
Alternately, what I’d really like to do is to allow side menus in the tabbed view rather than in the global index.html view - then this gesture chicanery wouldn’t be necessary.
It’s a bit odd that there is a drag-content=“false” tag added to the content on the about page and it seems to serve no purpose since the drag-content=“main.dragContent” on the ion-pane is the only tag that seems to matter and that is updated via the main controller.
Hey! Im new to ionic and angularjs… Im trying few things here and there ^^.
I just tested your code on plnkr and its awesome. But i fail at using it in my case xD.
You set drag-content=“false” in about.html and the result shows that it works.
What im trying to do is to set drag-content=“false” in about.html about.html
is a tab in my application. I have three tabs: A,B,C. I want to open the side menus(left, right) only
when im in tab B. Other than setting drag-content=“false” in ion-content in the current html e.g. in about.html
and setting the controllers what else do i have to do to get access to sidemenus jsut in tab B?
The drag-content is watched by the sideMenuContent. So, you can change it on the fly depending on which tab you are on. Tabs have an on-selected attribute. When a tab is selected, you can then decide what to do to the draggability of the side menu.
If you setup a CodePen sample of your scenario, I can try to help out on it.
Btw… I just thought of another option, which i tried too. I had my side menus only in my friends-tab.html not my index.html. That worked very very well. I could acces my side menus only in friends-tab.html, which is my desire. The problem in that option is, that the side menus doesnt drag the header and the footer. Additionally, the headers of the menus are behind the header which is declared in index.html. If i could bring the header of the side menus in friends-tab.html to the front and make the menus drag the header/footer of my index.html, that would be even better because i wouldn’t need a Ctrl to set drag-content = “false” to disable the side menus in every template except in friends-tab.html.
YES! That worked. TY! I am able to open the side menus after i click on an li item but thats fine xD.
I just noticed that i dont have my nav-bar once i hit either settings or search in my left panel. I get to the corespoding template but nav-bar isnt showing. Any idea?
Im trying to get this work too. If you don’t remember my case…
I have 3 tabs and only 1 tab(friends-tab) has enabled side menus enabled (with help of on-select/deselect).
Now i tried no-drag-right to disable side menus in my setting.html and search.html and they are subordinate to friends-tab. I managed to disable left menu with no-drag-right but the right menu is still enabled and there is a bug to the right menu which is that it wont close sometimes.
Could it be that i cant use no-drag-right on templates which are subordinate to my friends-tab, which has side menus enabled on-select?