If thesrc
of img
element can get the right image, You can use angular-image-404
directive to show the fallback image.
<img src="./notFound.jpg" image-404="./fallback.jpg" width=200 height=120>
if the image-404
is empty, directive will get placeholder image from dummyimage.com, and fb-bgcolor
can set the background color of the default image, fb-color
set the color, fb-text
set the text on the image, like:
<img src="./notFound.jpg" image-404 fb-bgcolor="#C0392B" fb-color="#C5EFF7" fb-text="Not Found" max-width=200 height=120>