I\'m new to Ionic . I\'m creating an phonegap app using ionic blank template. When i swipe from left to right on second page of my app a black screen appears. I don\'t know
In case code above is not working: in the run
function you can add:
$ionicPlatform.views.swipeBackEnabled(false);
In the latest version of ionic you can also disable the swipe to go back feature only for certain views by using can-swipe-back="false" on ion-view.
<ion-view can-swipe-back="false"></ion-view>
According to the Ionic forum just use the following line of code in the config of your AngularJS module:
$ionicConfigProvider.views.swipeBackEnabled(false);
I wrote below code in app.js file .
angular.module(....)
.config(function($stateProvider,$urlRouterProvider,$ionicConfigProvider){
$ionicConfigProvider.views.swipeBackEnabled(false);
.
.
.
.//remaining code in config
}
In my case, there's a workaround using $ionicSideMenuDelegate
.
$ionicSideMenuDelegate.canDragContent(false);
Of course, you should inject the delegate into the controller's dependencies.