diff options
Diffstat (limited to 'client/js/controllers/home')
| -rwxr-xr-x[-rw-r--r--] | client/js/controllers/home/home.js | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/client/js/controllers/home/home.js b/client/js/controllers/home/home.js index b508c97..10142c9 100644..100755 --- a/client/js/controllers/home/home.js +++ b/client/js/controllers/home/home.js @@ -10,16 +10,31 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','I console.log(data); $scope.machines=Compute.getData().machines; Loading.stop(); - }; - - + } + + ; + if(Compute.getData().machines == null && Identity.isAlreadyLogin()){ + Loading.start(); + Compute.pullData(callMeAfterPullData); + } + else{ + if(Identity.isAlreadyLogin()){ + callMeAfterPullData(); + } + } + + + Image.getImages(function(){}); + + + $scope.raiseShowMachineDetailsEvent=function(id){ var callback=function(){ Loading.stop(); var data=Compute.getData(); $rootScope.$broadcast("showMachineDetailsEvent", data.machines[id], data.axioms); - + } Loading.start(); Compute.pullMachines(callback); |
