Make some test

This commit is contained in:
manzerbredes 2016-03-06 15:10:34 +01:00
parent b0b2dc9a64
commit 3b569b6d00
2 changed files with 15 additions and 2 deletions

View file

@ -16,6 +16,11 @@ mainApp.controller('homeCtrl', [ '$scope', 'Compute', '$rootScope', 'Loading','I
Loading.start();
Compute.pullData(callMeAfterPullData);
}
else{
if(Identity.isAlreadyLogin()){
callMeAfterPullData();
}
}
Image.getImages(function(){});

View file

@ -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();
};
if(Image.getData().images==null){
Loading.start();
Image.getImages(callbackTest);
}
else{
callbackTest();
}
}]);