# swipeBackEnabled not working, throws error

**URL:** <https://forum.ionicframework.com/t/swipebackenabled-not-working-throws-error/21090>\
**Category:** ionic-v1\
**Created:** [April 16, 2015, 9:56am UTC](https://forum.ionicframework.com/t/swipebackenabled-not-working-throws-error/21090 "2015-04-16T09:56:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mladen5](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mladen5/32/68585_2.png) [@mladen5](https://forum.ionicframework.com/u/mladen5)\
**Post date:** [April 16, 2015, 9:56am UTC](https://forum.ionicframework.com/t/swipebackenabled-not-working-throws-error/21090/1 "2015-04-16T09:56:25Z")

</div>

When i try to use `$ionicConfigProvider.swipeBackEnabled(false);` to disable swipeback on iOS i get this error:

> Uncaught Error: [$injector:modulerr] Failed to instantiate module starter due to:  
> TypeError: undefined is not a function

But i can use other $ionicConfigProvider options without any problems.

---

<div class="post-metadata">

**Author:** ![brandyshea](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/brandyshea/32/148286_2.png) [@brandyshea](https://forum.ionicframework.com/u/brandyshea)\
**Post date:** [April 16, 2015, 3:50pm UTC](https://forum.ionicframework.com/t/swipebackenabled-not-working-throws-error/21090/2 "2015-04-16T15:50:11Z")

</div>

It should be `$ionicConfigProvider.views.swipeBackEnabled(false);`

> [@Turn off Swipe go back feature](http://forum.ionicframework.com/t/turn-off-swipe-go-back-feature/17777/3):
>
> Alright! Found it in the commits to the nighly builds: There is a new config option for views: $ionicConfigProvider.views.swipeBackEnabled(false); This disables the Swipe to go back feature. It’s only good if view cache is enabled, which is not possible for me because it acts odd (shows same views on all pages even though different urls etc). Also, to solve to open menu on all pages with back button enabled. Add this to ion-side-menus: enable-menu-with-back-views="true"
