Hello!
I need to call an event to going back on mobile.
i just add "backKeydown to events in app (app.js)
but it does not react. Any ideas?
var app = new Framework7({
...,
view: {
pushState: true
},
pushState: true,
...
on: {
init: function () {
var f7 = this;
if (f7.device.cordova) {
// Init cordova APIs (see cordova-app.js)
cordovaApp.init(f7);
}
},
backKeyDown: function() {
alert('1')
if (app.views.main.router.url == '/') {
navigator.app.exitApp();
} else {
mainView.router.navigate('/', {});
}
}
},
});