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

	$scope.doUpload = function () {
		Image.uploadImage($scope.myFile,function(){});
	};
	
}]);