Disable IOS Swipe To Go Back In Ionic 1.x Apps

Posted By Weston Ganger

When building games or certain components in my ionic applications, I dont want the user to be able use the browser back function using the iOS swipe to go back. Ionic makes it simple to do this.

If you want to disable this on a per-page basis you can simply do the following:

.controller('MyCtrl', function($scope, $ionicConfig) {
  // Disable

  // Enable

You can apply this method in any way you want such as disabling with certain routes, disable on enter of a view and enable on leave or just in general.

Related External Links:

Article Topic:Software Development - Javascript

Date:July 26, 2016