Max
Max

Reputation: 97

Append div after every items in ng-repeat

i need to create some button dependenly from my array, in this mode i create in my view:

<button  ng-repeat=...../>

but i would have a div after every items, i dont think is correct to insert into button , and for this i try to move to out. But if i create a div outer my button with ng repeat : like :

<div ng-repeat>
   <button ..../>
   <div ..../>
</div>

the layout seeems broken. How i can solve? thanks

Upvotes: 1

Views: 131

Answers (2)

Sunil
Sunil

Reputation: 138

try this remove div

<input type ="button" ng-repeat="item in items" ng-value="item.value"/>

Upvotes: 0

kingdaro
kingdaro

Reputation: 12028

Here, it looks like you want to use the ng-repeat-start and ng-repeat-end directives, to define the start and end of the group of elements that should be repeated.

<button ng-repeat-start="item in items" />
<div ng-repeat-end />

See docs here for details.

Upvotes: 2

Related Questions