Angular ng-style to alternate table colours
<p>I'm using ng-repeat to create a table. I have an ng-style filter that looks at the values in a table row and if a certain word appears it changes that colour of that row.</p>

<p>The expression that I'm using is:</p>

<pre><code>&lt;tr ng-repeat="a in b" ng-style="a.name == 'user1'?{'background-color':'orange'}:{}"&gt;
</code></pre>

<p>This is working fine, however what I would like to be able to do is alternate between orange and another colour when there are more than two rows that match so that I don't just have solid blocks of colour in my table.</p>

<p>Is it possible to add another condition to ng-style that looks at if a row is odd or even and then I can alternate the colours of matching rows that way? Or is there another way to do this using css? I'm not sure if I can control css from ng-style?</p>