Depending on the value elsewhere on the html page, I need a row inside the table to display more cells and then everywhere in the table. To keep alignment correct and everything clean, I'm looking for a way to dynamically set colspan cells using angular. I just can't get this to work.
<input type="checkbox" ng-model="vm.noInventory"/>
<table>
<th>
<td>Product</td>
<td colspan={{vm.noInventory ? '2' : '1'}}>Inventory<td>
<td ng-show="vm.noInventory"></td>
</tr>
<tr>
<td>Product B</td>
<td>55 parts</td>
<td ng-show="vm.noInventory">Backordered</td>
</tr>
</table>
source
share