Reputation: 863
Given the following code, how do you define the colspan of that first td to match the number of other "td"s in its table so that it can take the full width of the table?
<table ng-repeat="product in products">
<tr>
<td colspan="">
{{product.name}}
</td>
</tr>
<tr ng-repeat="item in product.items">
<td ng-repeat="element in item">
{{element}}
</td>
</tr>
</table>
Live code here: http://jsfiddle.net/z37uofqk/
Upvotes: 2
Views: 1427
Reputation: 486
I think what you're trying to do is get the column to span the whole table. This is a good way to do that:
<td colspan="100%">
{{product.name}}
</td>
Upvotes: 2