Currently, I am utilizing the ng-repeat
directive in conjunction with the ng-repeat-start
/ng-repeat-end
options. Within the main loop, there is an additional inner ng-repeat
. However, the problem lies in the fact that the outer ng-repeat-start
declaration serves solely as a looping mechanism and I do not actually need to repeat the HTML element on which it is declared. Below is an example:
<tbody>
<tr ng-repeat-start="anArray in arrayOfArrays"> <!-- HOW TO REMOVE THIS EMPTY <tr>? -->
</tr>
<tr ng-repeat="item in anArray ">
<td>{{item .name}}</span></td>
<td>{{item .surname}}</td>
</tr>
<tr ng-repeat-end>
<td>
<span>Total</span>
</td>
</tr>
</tbody>
I am seeking a way to remove the <tr>
element while still maintaining the loop declaration.
I attempted to declare both loops (outer and inner) within the same <tr>
element, but this approach did not prove successful:
<tr ng-repeat-start="anArray in arrayOfArrays" ng-repeat="item in anArray ">
</tr>