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:
commit
585f83825f
1 changed files with 8 additions and 1 deletions
|
|
@ -43,8 +43,15 @@ angular.element(document).ready(function() {
|
||||||
// window.location = '#/cordoba/online';
|
// window.location = '#/cordoba/online';
|
||||||
// }, false);
|
// }, false);
|
||||||
|
|
||||||
|
// Back button event
|
||||||
document.addEventListener('backbutton', function() {
|
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);
|
}, false);
|
||||||
|
|
||||||
document.addEventListener('menubutton', function() {
|
document.addEventListener('menubutton', function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue