How to display image in AngularJS using ng-src directive

If you have an image url and you want to display it in html document using <img> element, you should use ng-src instead of src attribute to correctly bind the image url using AngularJS expression.

Using Angular markup like https://angularjs.org/img/{{vm.ImageFileName}} in a src attribute doesn't work right because the browser will try to fetch from the URL with the literal text until AngularJS replaces the expression inside {{vm.ImageFileName}}. The ngSrc directive solves this problem.