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 /client/js/controllers/image | |
| parent | b0b2dc9a6451fc1a2d41b255600094da1ece6485 (diff) | |
Make some test
Diffstat (limited to 'client/js/controllers/image')
| -rw-r--r-- | client/js/controllers/image/image.js | 12 |
1 files changed, 10 insertions, 2 deletions
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(); + } + }]); |
