JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-controller="c">
<img ng-src="{{src}}" imageonload />
</div>
JavaScript
var app = angular.module('app', []);
app.directive('imageonload', function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.bind('load', function() {
alert('image is loaded');
});
}
};
});
app.controller('c', function($scope) {
$scope.src ="https://www.google.com.ua/images/srpr/logo4w.png";
});