diff options
| author | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-09-16 16:18:21 -0400 |
|---|---|---|
| committer | Arjun Roychowdhury <pliablepixels@gmail.com> | 2015-09-16 16:18:21 -0400 |
| commit | 6925bf9fee6726a23cc4a1b7ef4a7768eb0a47ad (patch) | |
| tree | 4141a8d96b6605a24dc7844d97e91d8ca141b279 /www/js/app.js | |
| parent | 5748f50fc5cc7b58124cd432448c55e3d4324eaf (diff) | |
switch to same state after resume
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() |
