Last active
November 10, 2017 08:20
-
-
Save webcat12345/9fc78178f40e89327694d0d951176363 to your computer and use it in GitHub Desktop.
Display placeholder image if url is invalid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is way is very simple and nice way to display images in Angular. | |
<img [src]="imageUrl" class="img-responsive" onError="this.src='assets/images/no-image.png';"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment