Use ng-src with img elements

I had an an img element that looked like this:

<img src="{{post.imageUrl}}" />

And I saw that the page was making a request for “/{{post.ImageUrl}}”.

To prevent templated img elements from requesting their templated markup, use ng-src like:

<img ng-src="{{post.imageUrl}}" />
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.