I have an ng-repeat list and I'm trying to alternate background colors for each item by doing

```
class="bg-{{$index%3}}"

```

but its also binding to $index despite changing the order of items resulting in items having a strict background color order of color 1, color2, color 3, so on. I want it to be such that the bg colors/class do not change when order is changed. Each item should have the class assigned only once.

Demo of problem: [plunker](http://plnkr.co/edit/89a9Jfmnni5YEgCRkpH9?p=preview)