Yes, that was this dirty checking i was thinking when i said from inside / outside angular
If the download was successful :
Set the img element to the completely available state, update the presentation of the image appropriately, and fire a simple event named load at the img element.
"fire a simple event" means (again from
w3 site):
Firing a simple event named e means that an event with the name e, which does not bubble (except where otherwise stated) and is not cancelable (except where otherwise stated), and which uses the Event interface, must be created and dispatched at the given target.
So it seems that image load event doesn't bubbles.
Maybe i can try to bind to the load event of each images.
But when the directive compile, img tags may not be present yet so i'll need to watch when new elements are added. Is there a way to do that ?