Disable ios swipe to go back for specific views



I am wondering if there is a simple way to disable swipe to go back for specific views? Maybe it’s simpler to disable it for all views and then only allow it on certain views.

Where can I find documentation on this?

Thanks in advance! :slight_smile:

Can-swipe-back="false" doesn't work to prevent iOS swipe back
V1.0.0-rc.0: How to disable swipe to go back?
Swipe Back view

Ok, I worked out from existing documentation to add this code to my app.js:

// let's turn off swipe to go back

app.config(function($ionicConfigProvider) {

I would like to enable it on one or more views though if possible.


I have one page that uses a fullscreen slide box. It does not play nice in combination with slide to go back…


currently you can only have the whole feature enabled or disabled, rather than enabled only for specific views


ok great, thanks for the info.


Yes, that would be a great option.

I would like to disable it on forms, where I have implemented a confirmation before closing/moving away from the view.



You must be able to turn off this feature whenever because it’s sometimes overriding everything that otherwise prevents a “go back” event. Like the hardware back on Android is prevented easily. But not iOS swipe to go back. makes no sense.



I would like to be able to enable or disable the swipe to go back feature per view.


it is weird, but in my case, if page caching is disabled this “back swipe” delete(or do not load) data on the page and page shows blank…also if you do not finished your move, it do not reload previous page state. :worried:
I did not know about adding this function and my glitchy app in App Store now :sweat_smile:


I unfortunately had to disable this awesome feature (for now) in our mobile app b/c we have a view that toggles between a list and map and as you drag around the map it’s very easy to swipe back to the previous view.


A solution is offered here:


Use can-swipe-back=“false” on your ion-view element.


Worked great thank you


Thank you <3!!! ! ! ! !