Why does the following statement throw an error?
Idea: To show an image from the normal URL. If it\'s not found (404), show a fallback image.
<
You should implement this logic in the component, not in the template.
Then change your template like so:
Then create an error handler, like so:
changeSource(event, name) { event.target.src = this.fallback_path + name; }
Which updates the image source to your fallback source.