angular/angular.js — pull request #6965 by btford (2014-04-02 23:04:43+00:00)
Title: fix(ngClass): handle ngClassOdd/Even affecting the same classes

WIP; pls don't merge yet thx.

The basic approach is to introduce a new `elt.data()` called `$classCounts` that keeps track of how many times `ngClass`, `ngClassEven`, or `ngClassOdd` tries to add a given class. The class is added only when the count goes from `1` to `0`, and removed only when the count hits `0`.

In order to avoid duplicating work, I moved some of the logic for checking which classes to add/remove into this directive and make the call to `$animate` myself.

Closes #5271