title: how to use ng-class calling a controller function
body: <p>I have 3 possible data types ('a','b', and 'c') and I have 3 differet classes for them.  The problem is my controller function never gets called.</p>
  
  <p>my CSS</p>
  
  <pre><code>.a{
      color: red
  }
  .b{
      color: blue
  }
  .c{
      color: green
  }
  </code></pre>
  
  <p>my function</p>
  
  <pre><code>    this.getClass = function(num){
          console.log("here");
          var returnVal = '';
          if (num &lt;= 1){
                  returnVal = 'a'
              }
          else if (num &gt; 1 &amp;&amp; num &lt; 10)
              {   returnVal = 'b'
          }
          else{
                  returnVal = 'c'
          }
          return returnVal;
      };
  </code></pre>
  
  <p>my html
  UPDATED!</p>
  
  <pre><code>&lt;tr id="num{{$index}}"
              ng-click="$map[$index] = ! $map[$index]"
              ng-repeat-start="num in currentController.nums"
              ng-class="currentController.getClass($num)"&gt;
      &lt;td&gt;num&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>according to the ngClass docs listed <a href="https://docs.angularjs.org/api/ng/directive/ngClass" rel="nofollow">https://docs.angularjs.org/api/ng/directive/ngClass</a></p>
  
  <pre><code>If the expression evaluates to a string, the string should be one or more space-delimited class names.
  </code></pre>