summaryrefslogtreecommitdiff
path: root/client/js/controllers/image/image.js
blob: e298fcc0cb803070c22393ca937b8246f14424bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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();
	}
	
}]);