Javascript – Angular.js ng-repeat across multiple elements

angularjsangularjs-ng-repeatjavascriptjquery

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?

Best Answer

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>