diff options
Diffstat (limited to 'www/js/app.js')
| -rw-r--r-- | www/js/app.js | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/www/js/app.js b/www/js/app.js index 771f9fb1..2ed58cd6 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -620,8 +620,24 @@ angular.module('zmApp', [ disableAnimate: true, disableBack: true }); - $state.go("zm-portal-login"); - + + // remember the last state so we can + // go back there after auth + if ($ionicHistory.currentView) + { + $rootScope.lastState = $ionicHistory.currentView().stateName; + $rootScope.lastStateParam = + $ionicHistory.currentView().stateParams; + ZMDataModel.zmDebug ("Last State recorded:" + + JSON.stringify($ionicHistory.currentView())); + + $state.go("zm-portal-login"); + } + else + { + $rootScope.lastState = ""; + $rootScope.lastStateParam = ""; + } //$ionicSideMenuDelegate.toggleLeft(false); //ZMDataModel.validatePin() |
