title: Using ngClass for both a dynamic class and an optional class
body: <p>I am using <code>ngGrid</code> and in the process of customizing a cell template, I came across a situation where I would like to use <code>ngClass</code> to create a dynamic class name as well as optionally add another class onto a single element.</p>
  
  <p>I know that <code>ngClass</code> can be used in multiple ways. The two I am interested in combining are as follows</p>
  
  <pre><code>&lt;input type="text" data-ng-class="'colt' + col.index"/&gt;
  
  &lt;input type="text" data-ng-class="{'error' : cptForm.$invalid}"/&gt;
  </code></pre>
  
  <p>Is there anyway to combine these usages of <code>ngClass</code>? Something like</p>
  
  <pre><code>&lt;input type="text" data-ng-class="{'colt' + col.index: true, 'error' : cptForm.$invalid}"/&gt;
  </code></pre>
  
  <p>Alternatively, I could create a method on my controller that does the work of creating both of these classes, but I would like to do the work in-line if I could.</p>