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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -