summaryrefslogtreecommitdiff
path: root/client/js/controllers/image/image.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/js/controllers/image/image.js')
-rw-r--r--client/js/controllers/image/image.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/client/js/controllers/image/image.js b/client/js/controllers/image/image.js
new file mode 100644
index 0000000..e298fcc
--- /dev/null
+++ b/client/js/controllers/image/image.js
@@ -0,0 +1,21 @@
+/**
+ * The image controller
+ *
+ * @param {$scope} $scope The $scope service from angular
+ */
+mainApp.controller('imageCtrl', ['$scope', 'Image', 'Loading', function ($scope, Image, Loading)
+{
+ var callbackTest=function(){
+ $scope.images=Image.getData().images;
+ Loading.stop();
+ };
+
+ if(Image.getData().images==null){
+ Loading.start();
+ Image.getImages(callbackTest);
+ }
+ else{
+ callbackTest();
+ }
+
+}]);