V1.0.0-rc.0: How to disable swipe to go back?


#1

I just updated Ionic and ran into the following issue:

I have caching globally disabled. When I am in a view which is not the root of the navigation stack I observed the follwing: When I swipe from the very left to any direction, the screen turns white and the footer is hidden.

To avoid that behavior I want to disable swipe to go back on ios. How do I do that?

Thank you in advance!


Swipe Back view
Sidemenu w/ Tabs disable swipe content to reveal sidemenu
#2

I want to know how to enable it.


#3

Found how to disable it:

$ionicConfigProvider.views.swipeBackEnabled(false);

#4

Thank you, Sebastian.

Does anyone know how to disable it for a specific view?
I want to disable it on forms, where I have implemented a confirmation before closing/moving away from the form.

Update:
Just found this thread: #18808


#5

I’m also looking to disable swipe to go back on one specific view. Has anyone done that before?


#6

:+1: -> using can-swipe-back=“false” on my ion-view worked to disable swipe-back on a single view (found at the bottom of your linked thread)


#7

use as

< ion-view view-title=“View Title” can-swipe-back=“false”>
< /ion-view>

and it will disable swipe-back on that view


#8

Hello, Where did you find it?

it is not here in the docs. Which makes me wonder why is the official docs in such an incomplete state? That worries me a bit. Anyways, could you please let me know where and how did you find this solution?

Thank you very much!


#9

its here

http://ionicframework.com/docs/api/directive/ionView/


#10

This does not appear to be working for me, did anybody else have this problem? (And come up with a solution?)


#11

neither it is working to me


#12

It does not work for ionic 1.3.2