title: How do I compare with a string in ng-class?
body: <p>This line doesn't seem to work for me. </p>
  
  <pre><code>Sort By: &lt;a href="" ng-click="setOrder('title')" ng-class="{active: orderProp == 'title'}"&gt;Alphabetical&lt;/a&gt;
  </code></pre>
  
  <p>Do I have to escape 'title' in orderProp == 'title' somehow?</p>
  
  <p>in the controller I have</p>
  
  <pre><code>...
  $scope.orderProp = 'title';
  $scope.setOrder = function(sortBy){
              $scope.orderProp = sortBy;
  }
  ...
  </code></pre>
  
  <p>Thank you</p>
  
  <p><strong>Update:</strong> <strong><em>Using v1.3.0-beta.17</em></strong> </p>
  
  <p>Adding  <code>ng-class="{active:orderProp=='pagetitle'}</code> to </p>
  
  <pre><code>&lt;a href="" ng-click="setOrder('pagetitle')" ng-class="{active:orderProp=='pagetitle'}"&gt;Alphabetical&lt;/a&gt;
  </code></pre>
  
  <p>throws an error </p>
  
  <pre><code>"Error: [$parse:syntax] http://errors.angularjs.org/1.3.0-beta.17/$parse/syntax?p0=undefined&amp;p1=not%20a%20primary%20expression&amp;p2=null&amp;p3=%7Bactive%3AorderProp%3D%3D&amp;p4=%7Bactive%3AorderProp%3D%3D
  </code></pre>
  
  <p>Sorry for the way I present the error but I just started angular last week and don't know a better way</p>
  
  <p><strong>Update 2:</strong>
  error seems to be coming from = == ===. I tried > and no error occured. Is there an alternative syntax to like eq?</p>
  
  <p><strong>Update 3 with solve</strong></p>
  
  <p>I mapped each string to an int pagetile->1 code->2 + data-ng-class="{active:orderPropIdx==1};"
  Inside the controller I just do if pagetitle set active:orderPropIdx to 1 and so on</p>
  
  <p>Maybe this is a bug in angular 1.3</p>