Image Get Requests with AngularJS Image Get Requests with AngularJS angularjs angularjs

Image Get Requests with AngularJS


Try replacing your src with ng-src for more info see the documentation:

Using Angular markup like {{hash}} in a src attribute doesn't work right: The browser will fetch from the URL with the literal text {{hash}} until Angular replaces the expression inside {{hash}}. The ngSrc directive solves this problem.

 <div ng-controller="Cont">      <img ng-src="{{imageSource}}"> </div>


If someone is searching the solution for styling background-image then use this:

<div ng-style="{'background-image': 'url({{ image.source }})'}">...</div>