0

I want to create an html structure like that:
<div><img src="...."><img src="...."><img src="...."><img src="...."></div>
If I use <div ng-repeat="image in images"><img ng-src="{{images}}"/></div, i will get structure like: <div><img></div> <div><img></div> <div><img></div> <div><img></div>.
So, have anyway to loop img without div parent loop

2 Answers 2

3

Put the ng-repeat on the image instead

<div>
  <img ng-repeat="image in images" ng-src="image"/>
</div>
Sign up to request clarification or add additional context in comments.

Comments

1

Why not just do:

 <div>
     <img ng-repeat="image in images" ng-src="images">
 </div>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.