diff options
Diffstat (limited to 'www/js/MonitorCtrl.js')
| -rw-r--r-- | www/js/MonitorCtrl.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js new file mode 100644 index 00000000..300f5538 --- /dev/null +++ b/www/js/MonitorCtrl.js @@ -0,0 +1,28 @@ +angular.module('zmApp.controllers').controller('zmApp.MonitorCtrl', function ($scope, ZMDataModel, message,$ionicSideMenuDelegate) { + + $scope.monitors = []; + +$scope.openMenu = function () { + $ionicSideMenuDelegate.toggleLeft(); + } + + console.log("***EVENTS: Waiting for Monitors to load before I proceed"); + + $scope.monitors = message; + // console.log("I GOT " + $scope.monitors); + + console.log("HERE"); + + $scope.doRefresh = function () { + console.log("***Pull to Refresh"); + $scope.monitors = []; + + var refresh = ZMDataModel.getMonitors(1); + refresh.then(function (data) { + $scope.monitors = data; + $scope.$broadcast('scroll.refreshComplete'); + }); + + }; + +});
\ No newline at end of file |
