From 55c5be3821cdbb58f90547bf85406f01efdf12c9 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 5 Jan 2018 14:06:56 -0500 Subject: handled event reload when within events - state.go seems wonky --- www/js/EventCtrl.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'www/js/EventCtrl.js') diff --git a/www/js/EventCtrl.js b/www/js/EventCtrl.js index 1543d5d6..efc98d27 100644 --- a/www/js/EventCtrl.js +++ b/www/js/EventCtrl.js @@ -90,6 +90,7 @@ angular.module('zmApp.controllers') $scope.$on('$ionicView.afterEnter', function() { + console.log ("********* AFTER ENTER"); // $ionicListDelegate.canSwipeItems(true); @@ -1153,11 +1154,12 @@ angular.module('zmApp.controllers') //---------------------------------------------------------------- $scope.handleAlarms = function() { - $rootScope.isAlarm = !$rootScope.isAlarm; - if (!$rootScope.isAlarm) + // $rootScope.isAlarm = !$rootScope.isAlarm; + if ($rootScope.isAlarm) { $rootScope.alarmCount = "0"; - $ionicHistory.nextViewOptions( + $rootScope.isAlarm = !$rootScope.isAlarm; + /*$ionicHistory.nextViewOptions( { disableBack: true }); @@ -1168,7 +1170,8 @@ angular.module('zmApp.controllers') }, { reload: true - }); + }); */ + getInitialEvents(); return; } }; -- cgit v1.2.3