Enable menu swipe on all views


#1

Hello everybody!

I have an issue after upgrading to Ionic 1.0.0-rc.3, where I can no longer swipe to open the menu no matter where I am in my application. Now, the behavior has been changed to be 'swipe to go back’for child views and ‘swipe to open menu’ for root views.

I’m looking for a way to have a back button present in the upper left corner on child views, but still be able to swipe for the menu.

Is it possible to disable the new navigation scheme and go back to the old way?


#2

To disable the swipe to go back feature, add this to your config:

$ionicConfigProvider.views.swipeBackEnabled(false);

And make sure your menu has enable-menu-with-back-views set to true:

<ion-side-menus enable-menu-with-back-views="true">

#3

I tried this yesterday (actually from the same answer you gave in another thread about this) but it didn’t work. Can there be some kind of relationship between the two?


#4

Hmm I tested this on iOS using the starter sidemenu app (ionic start myApp sidemenu) and it is working for me. Could you show me an example of your code so I can see what’s different?


#5

Oh, sorry… I should maybe have said that it somehow worked for me now.

The only thing i added from the last time i tried it was the part:
$ionicConfigProvider.views.swipeBackEnabled(false);

So, I’m guessing it had something to do with that. But thanks for the assist!


#6

Oh, yeah setting the swipe back enabled to false will prevent the user from being able to swipe back when swiping close to the edge of the screen. Even with that enabled you would still be able to open the side menu, you just have to swipe further from the edge of the screen.