2

Not sure why my image's aren't being loaded by angular, here's what I've got:

<li class="list-group-item" ng-repeat="family in product.families | orderBy:'category'">
    <h3>{{family.category}}</h3>
    <div class="img-wrap">
        <img ng-src="{{family.image}}"/>
    </div>
</li>

family.category works, but my ng-src does not seem to be. When I look in the HTML of the loaded page all I see is <img ng-src>

JSON Sytnax

"families": [
    {
      "category": "Tablets",
      "image": "images/tablet.png"
    }
]

You can take a look at the live version of this here

Community
  • 1
  • 1
Adjit
  • 10,134
  • 12
  • 53
  • 98
  • possible duplicate of [Understanding AngularJS ng-src](http://stackoverflow.com/questions/18235169/understanding-angularjs-ng-src) – Oyeme Sep 28 '15 at 15:03

1 Answers1

2

Make sure image url is correct, try complete image url in json.

In chrome dev tools-> network check which url it in invoking.

--

I have low reputation can't comment.

Praveen Prasad
  • 1,863
  • 3
  • 13
  • 13
  • Actually... this is right, yeah I was pointing to my un-updated JSON file, so it wasn't fetching any url's. Thanks for helping me realize that – Adjit Sep 28 '15 at 15:09