1

I have the following code:

<li ng-repeat="item in somearray">
    <img src="{{ item.url }}" />
</li>

For every item the browser makes a GET request that is an encoded expression, for example: "http://someurl.com/somepath/blalba/1/%7B%7Bitem.url%7D%7D". Although it does load these images properly, it makes unnecessary requests. Is there any way to avoid this?

2
  • possible duplicate of Image Get Requests with AngularJS Commented Jun 29, 2013 at 20:06
  • Yes, it is. I did some searching but apparently my keywords were wrong. Commented Jun 29, 2013 at 20:21

1 Answer 1

2

Use:

<li ng-repeat="item in somearray">
    <img ng-src="{{item.url}}" />
</li>
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.