title: Applying ng-class based on value
body: <p>I have a simple <code>ng-repeat</code> that displays a list of scores and a value of either Positive or Negative.</p>
  
  <p>What i am trying to do is when the value is Negative, display a red background CSS class, and when Positive, display a green CSS class. However, for some reason, i am always seeing the <strong>red</strong> CSS class on my page.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;tr ng-repeat="scores in Test" ng-class="{true: 'warning', false: 'ok'}[scores.Indicator == 'Negative']"&gt;                       
       &lt;td&gt;Overall: {{ scores.Indicator }}&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>.warning {
      background: red;
  }
  
  .ok {
      background: green;
  }
  </code></pre>