title: ng-class condition changes, but not updating classes
body: <p>I have a very strange issue. I have to set an <code>active</code> class on the appropriate <code>&lt;li&gt;</code> when the <code>$scope.selectedCat == cat.id</code>. The list is generated with ng-repeat. If selectedCat is false, the 'Browse All Categories' list item (outside of ng-repeat) is set to active. <code>setCat()</code> sets the value of the <code>$scope.selectedCat</code> variable:</p>
  
  <pre><code>&lt;div id="cat-list" ng-controller="CatController"&gt;
      &lt;li ng-class="{'active': {{selectedCat == false}}}"&gt;
          &lt;a&gt;
              &lt;div class="name" ng-click="setCat(false)" &gt;Browse All Categories&lt;/div&gt;
          &lt;/a&gt;
      &lt;/li&gt;
      &lt;li class="has-subcat" ng-repeat="cat in cats | filter:catsearch" ng-class="{'active': {{selectedCat == cat.id}}}"&gt;
          &lt;a&gt;
              &lt;div cat class="name" ng-click="setCat({{cat.id}})" ng-bind-html="cat.name | highlight:catsearch"&gt;&lt;/div&gt;
          &lt;/a&gt;
      &lt;/li&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When the page loads, everything works fine (snapshot from FireBug):</p>
  
  <pre><code>&lt;li ng-class="{'active': true}" class="ng-scope active"&gt;
  &lt;!-- ngRepeat: cat in cats | filter:catsearch --&gt;
  &lt;li class="has-subcat ng-isolate-scope" ng-repeat="cat in cats | filter:catsearch" ng-class="{'active': false}"&gt;
  </code></pre>
  
  <p>However when I set $scope.selectedClass to a <code>cat.id</code> value, the condition within ng-class gets evaluated correctly, but ng-class won't update the classes accordingly:</p>
  
  <pre><code>&lt;li ng-class="{'active': false}" class="ng-scope active"&gt; &lt;!--Right here!--&gt;
  &lt;!-- ngRepeat: cat in cats | filter:catsearch --&gt;
  &lt;li class="has-subcat ng-isolate-scope" ng-repeat="cat in cats | filter:catsearch" ng-class="{'active': true}"&gt;
  </code></pre>
  
  <p>Please note that in the first line active class stays set, while ng-class evaluates to false. In the last line active is not set, while ng-class evaluates to true.</p>
  
  <p>Any ideas why it doesn't work? What's the correct Angular way of doing this?</p>