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="https://stackoverflow.com/questions/12922509/{{imageSource}}">
 </div>

Leave a Comment