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

1

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.