Fork me on GitHub

Angular Image 404 directive

If thesrcof imgelement can get the right image, You can use angular-image-404directive to show the fallback image.

basic usage

<img src="./notFound.jpg" image-404="./fallback.jpg" width=200 height=120>

if the image-404is empty, directive will get placeholder image from dummyimage.com, and fb-bgcolorcan set the background color of the default image, fb-colorset the color, fb-textset 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>