diff options
Diffstat (limited to 'www/js/controllers.js')
| -rw-r--r-- | www/js/controllers.js | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/www/js/controllers.js b/www/js/controllers.js index 914a23bf..16a02ba2 100644 --- a/www/js/controllers.js +++ b/www/js/controllers.js @@ -4,11 +4,38 @@ -angular.module('zmApp.controllers', ['ionic', 'ngCordova', 'ng-mfb','angularCircularNavigation']) +angular.module('zmApp.controllers', ['ionic', 'ngCordova', 'ng-mfb','angularCircularNavigation','angular-carousel']) -.controller('zmApp.AppCtrl', function($scope, $ionicSideMenuDelegate) { +.controller('zmApp.BaseController', function($scope, $ionicSideMenuDelegate, $ionicPlatform, $timeout, $rootScope) { $scope.openMenu = function () { $ionicSideMenuDelegate.toggleLeft(); }; + + $ionicPlatform.registerBackButtonAction(function (event) { + console.log ("ANDROID BACK"); + $ionicSideMenuDelegate.toggleLeft(); + $timeout (function() { + $rootScope.stateofSlide = $ionicSideMenuDelegate.isOpen() + new Date(); + },500); + + /* $timeout ( function() { + + + if ($ionicSideMenuDelegate.$getByHandle('sideMenu').isOpenLeft()) + { + console.log ("**** EXITING APP ****"); + } + else + { + console.log ("**** GOING TO SLIDE MENU"); + // $ionicSideMenuDelegate.toggleLeft(); + $ionicSideMenuDelegate.$getByHandle('sideMenu').toggleLeft(); + } + + + },100);*/ + + +}, 100); }); |
