Angular.js ng-repeat across multiple elements

geoidesic picture geoidesic · Jun 3, 2013 · Viewed 55.3k times · Source

This question has been partly addressed here: Angular.js ng-repeat across multiple tr's

However that is just a work-around really, it doesn't actually address the core issue, which is: how can one use ng-repeat across multiple elements without a wrapper?

For example, jquery.accordion requires you to repeat an h3 and div element, how could one do this with ng-repeat?

Answer

Igor Minar picture Igor Minar · Jun 5, 2013

We now have a proper support for this, please see:

AngularJs Commmit

with this change you can now do:

<table>
  <tr ng-repeat-start="item in list">
      <td>I get repeated</td>
  </tr>
  <tr ng-repeat-end>
      <td>I also get repeated</td>
  </tr>
</table>