javascript - why image is not display in angular js -


i make simple demo in angular js call service .actually not able display image in list . first check web service url

on desktop : --disable -websecurity

  • i able call service image not display on list here code on code pen

http://codepen.io/anon/pen/qdpoyn

<div class="list" ng-repeat="d in data">      <a class="item item-thumbnail-left" href="#">         <img src={{d.image.thumb}}>         <h2>{{d.headline}}</h2>         <p>{{d.dateline}}</p>     </a> </div>  </div> 

use ng-src:

using angular markup {{hash}} in src attribute doesn't work right: browser fetch url literal text {{hash}} until angular replaces expression inside {{hash}}. ngsrc directive solves problem.

<img ng-src={{d.image.thumb}}> //   ^^^ 

Comments

Post a Comment

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -