From 83400033a3b7a91ad072a5d306355c9cd5a80d82 Mon Sep 17 00:00:00 2001 From: PliablePixels Date: Fri, 24 Jul 2015 15:48:01 -0400 Subject: integrated event scrubbing with direct image access - need to clean up code --- www/js/controllers.js | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'www/js/controllers.js') 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); }); -- cgit v1.2.3