How to disable swipe from the right?


#1

How to disable swipe from the right and save swipe from the left anywhere in myapp?
I can do it like this $ionicSideMenuDelegate.canDragContent(false); But it will work only on page with some controller with it and disable swipe from the left too.


#2

you can try

window.addEventListener('swiperight', function(e){
e.preventDefault();
}

I never tested it, but should work


#3

no… it`s not work. Any ideas?


#4

Can you make sure you are inside the event, by replacing e.preventDefault by a console.log ?


#5

Maybe you’re looking for this, put it in the config in the app.js

$ionicConfigProvider.views.swipeBackEnabled(false);