ng-class on html tag kills animation after triggering #4231
Description
When adding conditional classes with on html tag (with ng-class), setting it off for the first time kills all the animations on page as it removes animate state from html tag.
You can see example here: http://plnkr.co/edit/nbganjCblEL4Oj2hm6Y5
If you click on 2nd link animation would be toggled endlessly. Clicking on first link runs the animation only first time. All subsequent clicks will not animate.
I've investigated this and realized that during the animation, performAnimation checks for parent.inheritedData(NG_ANUMATE_STATE) which translates eventually to
animate state is add and removed from html tag.
As a result:
parent.inheritedData(NG_ANIMATE_STATE) || disabledAnimation).running
is always true after that point, thus bailing out of all the subsequent animations.