title: How can I base a cells colspan on a conditional value using angular?
body: <p>Based on a value elsewhere on the html page I need a row within a table to show more cells then everywhere else in the table.  In order to keep alignments correct and everything clean I am looking for a way to dynamically set the colspan of a cell using angular.  I just can't seem to get this working.</p>
  
  <pre><code>&lt;input type="checkbox" ng-model="vm.noInventory"/&gt;
  
  &lt;table&gt;  
    &lt;th&gt;
       &lt;td&gt;Product&lt;/td&gt;
       &lt;td colspan={{vm.noInventory ? '2' : '1'}}&gt;Inventory&lt;td&gt;
       &lt;td ng-show="vm.noInventory"&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
       &lt;td&gt;Product B&lt;/td&gt;
       &lt;td&gt;55 parts&lt;/td&gt;
       &lt;td ng-show="vm.noInventory"&gt;Backordered&lt;/td&gt;      
    &lt;/tr&gt;
  
  &lt;/table&gt;
  </code></pre>