Add auto update

This commit is contained in:
Loic GUEGAN 2016-05-08 15:14:47 +02:00
parent 3b5d1e033a
commit c5e909da1b
2 changed files with 7 additions and 15 deletions

View file

@ -14,12 +14,9 @@ mainApp.controller('imageCtrl', ['$scope', 'Image', 'Loading', 'Identity', '$roo
// If user is login try to retrieve data
if (Identity.isAlreadyLogin()) {
if (Image.getData().images == null) {
Loading.start();
Image.getImages(callMeAfterGetImage);
} else {
callMeAfterGetImage();
}
Loading.start();
Image.getImages(callMeAfterGetImage);
}
// Manager logout event