fixing bugs

This commit is contained in:
Gabriel Bazán 2015-12-10 09:59:56 -03:00
commit dd68836eea
2 changed files with 26 additions and 20 deletions

View file

@ -475,17 +475,22 @@ angular
}
})
.state('cordova', {
url: '/cordova/:status/:exit',
url: '/cordova/:status/:exit/:exitApp',
views: {
'main': {
controller: function($rootScope, $state, $stateParams, $timeout, go, isCordova) {
switch ($stateParams.status) {
case 'resume':
$rootScope.$emit('Local/Resume');
break;
case 'backbutton':
if (isCordova && $stateParams.exit == 'true' && !$rootScope.modalOpened) {
navigator.app.exitApp();
if ($stateParams.exitApp == 'true') {
navigator.app.exitApp();
} else {
window.plugins.toast.showShortBottom('Press again to exit');
}
} else {
$rootScope.$emit('closeModal');
}