I am using Angular 2
and I need to detect if an image has loaded in an image tag.
Is there an event for that?
Something like this :
<img [src]="imagesource" [loaded]="dosomething()">
To check if an image is loaded successful or not, you can combine the use of jQuery 'load()' and 'error()' event : $('#image1') . load(function(){ $('#result1'). text('Image is loaded!
<img [src]="imagesource" (load)="dosomething()">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With