I want to create a dynamic height & width table, but I'm having trouble with the table header.
The <td> elements display just fine with this ng-repeater
<tr ng-repeat="set in currFormData.volume track by $index">
<td ng-repeat="repSpace in set track by $index">
{{repSpace}}
</td>
</tr>
but I want a <th> row containing 1, 2, 3, 4... and it must adjust as the table adjusts. I'm looking for something like this which looks through only the second level of my model 1 time:
<tr>
<th ng-repeat="repSpace in set in currFormData.volume track by $index">{{$index + 1}}</th>
</tr>
Here is my $scope model:
$scope.currFormData = {"date" : "", "volume": [
[[1,135],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],
[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],
[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],
[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]]
] };
How can I make this work? I'm open to changing my model.