diff options
| author | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2016-03-06 15:10:34 +0100 |
|---|---|---|
| committer | manzerbredes <loic.guegan_secondary@yahoo.fr> | 2016-03-06 15:10:34 +0100 |
| commit | 3b569b6d008d5b1936ee04948cf5c1cc08790f39 (patch) | |
| tree | 6798a1629add2f673605c4e9f024ec68aba00036 | |
| parent | b0b2dc9a6451fc1a2d41b255600094da1ece6485 (diff) | |
Make some test
| -rw-r--r-- | client/js/controllers/home/home.js | 5 | ||||
| -rw-r--r-- | client/js/controllers/image/image.js | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/client/js/controllers/home/home.js b/client/js/controllers/home/home.js index 18133fa..4402e62 100644 --- a/client/js/controllers/home/home.js +++ b/client/js/controllers/home/home.js @@ -16,6 +16,11 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','I Loading.start(); Compute.pullData(callMeAfterPullData); } + else{ + if(Identity.isAlreadyLogin()){ + callMeAfterPullData(); + } + } Image.getImages(function(){}); diff --git a/client/js/controllers/image/image.js b/client/js/controllers/image/image.js index a8346b3..e298fcc 100644 --- a/client/js/controllers/image/image.js +++ b/client/js/controllers/image/image.js @@ -3,11 +3,19 @@ * * @param {$scope} $scope The $scope service from angular */ -mainApp.controller('imageCtrl', ['$scope', 'Image', function ($scope, Image) +mainApp.controller('imageCtrl', ['$scope', 'Image', 'Loading', function ($scope, Image, Loading) { var callbackTest=function(){ $scope.images=Image.getData().images; + Loading.stop(); }; - Image.getImages(callbackTest); + if(Image.getData().images==null){ + Loading.start(); + Image.getImages(callbackTest); + } + else{ + callbackTest(); + } + }]); |
