The above answer is misleading, and here's why. You need to cancel the load event, as this will cause an infinite load cycle on desktop and mobile browsers, if you run it in the ng-repeat directive, each src replacement will cause a new load event and, therefore, replace the image, etc. The above answer caused my application to break not only performance, but also caused crashes on mobile devices until I added unbind.
.directive('imageloaded', function () { return { restrict: 'A', scope:{imageloaded:'@'}, link: function postLink(scope, element, attrs) { element.bind('load', function() {
});
source share