title: How to assign alternate class to rows in Angular JS?
body: <p>I want to assign alternate class to rows in a table. I am using ng-repeat on </p>
  
  <pre><code>&lt;tr ng-repeat="event in events"&gt;
  </code></pre>
  
  <p>I want to get output like this:</p>
  
  <pre><code>&lt;tr class="odd"&gt;...&lt;/tr&gt;
  &lt;tr class="event"&gt;....&lt;/tr&gt;
  </code></pre>
  
  <p>I've tried this (doesn't work):</p>
  
  <pre><code>&lt;tr ng-repeat="event in events" class="$index % 2 == 0? 'event' : 'odd'"&gt;
  </code></pre>
  
  <p>I can't get it to work. Also it seems like Angular is using 'class' attribute to. Why is it doing so? Can I tell AngularJS not to use the class attribute for internal evaluations? </p>
  
  <p>Please help. Thanks!</p>