You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
...and during the initial digest, the value of property is initially null, but is then populated from some data store. Then the watch will be called twice, resulting in a removeClass() call (when the class isn't actually present), followed by an addClass() call. The end result would be the class is not added, which is not what I want.
Prior to to RC0, this pattern was simple, obvious, and it worked. It's a little wasteful to have the redundant removeClass() call, but since the class isn't actually present at that point, it's basically a no-op.
In RC0, $animate's tallying breaks this pattern. I presume it is counting the two calls as (-1) + 1, equalling 0, so performing no animation. However, since the the first removeClass() call is a no-op, the subsequent addClass() call should still run.
More generally, any call to addClass() and removeClass() that wouldn't actually result in a change should not be considered for tallying. If, during a digest cycle, the following series of operations was performed: