Adding rows with ng-repeat and nested loop

More than one year later but found a workaround, at least for two levels (fathers->sons).
Just repeat tbody‘s:

<table>
  <tbody ng-repeat="row in rows">
    <tr>
      <th>{{row.name}}</th>
    </tr>
    <tr ng-repeat="sub in row.subrows">
      <td>{{sub.name}}</td>
    </tr>
  </tbody>
</table>

As far as I know all browsers support multiple tbody elements inside a table.

Leave a Comment