Add functionnality

This commit is contained in:
Loic GUEGAN 2016-04-17 20:43:41 +02:00
parent a481b727d9
commit ae4e028231
5 changed files with 41 additions and 46 deletions

View file

@ -3,7 +3,7 @@
*
* @param {$scope} $scope The $scope service from angular
*/
mainApp.controller('imageCtrl', ['$scope', 'Image', 'Loading', 'Identity', function ($scope, Image, Loading, Identity)
mainApp.controller('imageCtrl', ['$scope', 'Image', 'Loading', 'Identity','$rootScope', function ($scope, Image, Loading, Identity, $rootScope)
{
// Update view
@ -21,4 +21,9 @@ mainApp.controller('imageCtrl', ['$scope', 'Image', 'Loading', 'Identity', funct
callMeAfterGetImage();
}
}
$scope.edit=function(image){
$rootScope.$broadcast("editImageEvent", image);
}
}]);