I'm new to this theme ionic. I read in several places I researched it does not work for me.
I would like to know how to do that when a person Press the button "back" of the cell not redirected to a previous state or to another view. I want that when the button is pressed "back" button of the Cell nothing happens.
I tried with this code, but it is the same thing happening, the button "back" my android device redirects me to another view of my application
$ionicPlatform.onHardwareBackButton(function() {
event.preventDefault();
event.stopPropagation();
alert('nothing');
});
I'm putting my code, in this part, I'm not sure if it's the right place:
angular.module('app', ['ionic'])
.run(function($ionicPlatform) {
$ionicPlatform.onHardwareBackButton(function() {
event.preventDefault();
event.stopPropagation();
alert('nothing');
});
$ionicPlatform.ready(function() {
if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
.
.
.