Disable Hardware Back Button In An Ionic 1.x App

Posted by Weston Ganger on November 21, 2015

I wanted to disable the back button in a game I was making with Ionic.

This code must go in your apps .run function, it will not work in your controllers.

/* www/js/app.js */

// To Disable Back in Entire App
}, 100);

// To Conditionally Disable Back
  if($ionicHistory.currentStateName === 'someStateName'){
}, 100);

Related External Links:

Posted in Ionic and Tagged with ionic android ios 

Want me to help develop your next project or application?

Contact Us

Specializing in Ruby-on-Rails, Javascript, Multi-Platform Electron Desktop Apps and Hybrid Cordova Mobile Apps.

Recommended Posts