summaryrefslogtreecommitdiff
path: root/client/js/controllers/image/image.js
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-06 15:10:34 +0100
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-06 15:10:34 +0100
commit3b569b6d008d5b1936ee04948cf5c1cc08790f39 (patch)
tree6798a1629add2f673605c4e9f024ec68aba00036 /client/js/controllers/image/image.js
parentb0b2dc9a6451fc1a2d41b255600094da1ece6485 (diff)
Make some test
Diffstat (limited to 'client/js/controllers/image/image.js')
-rw-r--r--client/js/controllers/image/image.js12
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();
+ }
+
}]);