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?
UPDATE: This answer is outdated. Please see @IgorMinar answer and use standard
ng-repeat-start
andng-repeat-end
directives.There are two options:First option is to create directive that will render several tags and replace source tag (jsfiddle)
Second option is to use updated source code of angular that enables comment style ngRepeat directive (plnkr)
We now have a proper support for this, please see:
AngularJs Commmit
with this change you can now do:
To answer Andre's question above on more than 2 levels of ng-repeat in a table, you can use multiple ng-repeat-start to accomplish this.
Here is a plunker example