damirarh / damirscorner-utterances

utteranc.es comments for https://damirscorner.com
0 stars 0 forks source link

/blog/posts/20210924-HandleMissingImagesInAngular.html #124

Open damirarh opened 1 year ago

damirarh commented 1 year ago

Imported

URL: https://www.damirscorner.com/blog/posts/20210924-HandleMissingImagesInAngular.html

damirarh commented 1 year ago

Imported comment written by Qasim AlQari- Mubarmj on 2023-02-05T08:23:54

Thanks a lot it help me

zreptil commented 1 year ago

Great idea, very useful :)

I have just one recommendation, since I needed to display the image again, if the src-attribute changes and the image could be displayed. Add the following Code in the directive and the image will be shown again, if the loading doesn't throw an error:

@HostListener('load') private onLoad() { this.el.nativeElement.style.display = 'initial'; }