diff options
Diffstat (limited to 'client/js/controllers/home/main.js')
| -rw-r--r-- | client/js/controllers/home/main.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/client/js/controllers/home/main.js b/client/js/controllers/home/main.js index 27de5f3..d93c376 100644 --- a/client/js/controllers/home/main.js +++ b/client/js/controllers/home/main.js @@ -3,7 +3,7 @@ * * @param {$scope} $scope The $scope service from angular */ -mainApp.controller('homeCtrl', [ '$scope', 'Compute', function ($scope, Compute) +mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', function ($scope, Compute, $rootScope) { var updatePage=function(){ @@ -12,5 +12,11 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', function ($scope, Compute) // Retrieve all Data Compute.pullData(updatePage); - + + $scope.raiseShowMachineDetailsEvent=function(){ + var machine={name: "Machine 1", online:true}; + $rootScope.$broadcast("showMachineDetailsEvent", machine); + } + + }]); |
