Skip to content

Replace img src attribute with ng-src when using Angular

Vinay Rosenberg requested to merge github/fork/davemevans/development into development

Created by: davemevans

Using Angular markup {{item.logo}} in a src attribute doesn't work correctly: the browser will fetch from the URL with the literal text {{item.logo}}, causing a 404, until Angular replaces the expression. The ngSrc directive solves this problem.

Source: http://docs.angularjs.org/api/ng.directive:ngSrc

Merge request reports