I am fetching a large number of image URLs from an API and display them in a angular 2 web application. Some of the URLs are broken and i want to replace them with a default
You can use onError event this way to handle invalid url or broken url.
onError
invalid url
broken url
This way you can directly assign img path to src with onError event