summaryrefslogtreecommitdiff
path: root/www/js/controllers.js
blob: 16a02ba22451182b908f95ce64b9065844e92473 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* jshint -W041 */
/* jshint browser: true*/
/* global cordova,StatusBar,angular,console */



angular.module('zmApp.controllers', ['ionic', 'ngCordova', 'ng-mfb','angularCircularNavigation','angular-carousel'])

.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);
});