Angular 5+ Image Fallback
Load placeholder image on image error
Angular 5+ directive that loads placeholder image on primary image error.
npm install ngx-img-fallback --save
For Angular 2+ use version
In case you're using
SystemJS see configuration here
Add module to your module's
Use it in you component
(loaded) event which is fired when either
src-fallback is loaded.
To determinate whether original source or fallback is loaded - add a param to your callback for the
First add callback to your component
and then bind it to the