Merge pull request #2566 from cmgustavo/bug/wp8-back-button

Back button should exit the app if there is no more previous pages
This commit is contained in:
Matias Alejo Garcia 2015-04-20 14:30:40 -03:00
commit 585f83825f

View file

@ -43,8 +43,15 @@ angular.element(document).ready(function() {
// window.location = '#/cordoba/online';
// }, false);
// Back button event
document.addEventListener('backbutton', function() {
window.location = '#/walletHome';
var loc = window.location;
if (loc.toString().match(/index\.html#\/$/)) {
navigator.app.exitApp();
}
else {
window.location = '#/walletHome';
}
}, false);
document.addEventListener('menubutton', function() {