Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

[ngAnimate] enter animation not working with ngClass #3603

Closed
mgcrea opened this issue Aug 15, 2013 · 5 comments
Closed

[ngAnimate] enter animation not working with ngClass #3603

mgcrea opened this issue Aug 15, 2013 · 5 comments

Comments

@mgcrea
Copy link
Contributor

mgcrea commented Aug 15, 2013

Looks like there might be some bug with ngClass animations (enter animation does not work).

<a ng-repeat="item in items" class="list-group-item" ng-class="'animation-fade'">

Is not working.
Works if I switch ngClass with class.

Plunker: http://plnkr.co/edit/8UrtBtMee9mE88o1qMwh?p=preview

@mgcrea
Copy link
Contributor Author

mgcrea commented Aug 29, 2013

Ended up using a custom ngView decorator, looks like an important regression from 1.1.x.

Maybe there is another way to achieve dynamic animations?
Any ideas @gsklee, @matsko?

@matsko
Copy link
Contributor

matsko commented Aug 29, 2013

Hey @mgcrea yes I am aware of this issue. What happens is that for some reason the browser thinks the transition is ongoing for the element when the first animation class is added. Then a 1ms reflow happens and the active class is added so the element doesn't go to the original start state at all and just sits around in the active state. So it looks like nothing animated. I have this fixed in a branch and this may help with your previous issue. The new PR that this will be apart of will fix ngClass as well so hopefully today or tomorrow it will be up.

@mgcrea
Copy link
Contributor Author

mgcrea commented Aug 29, 2013

Ok great, thanks @matsko.
Let me know if you want me to test it once ready.

@mgcrea
Copy link
Contributor Author

mgcrea commented Aug 30, 2013

@matsko Looks like the ngClass issue is fixed!
http://plnkr.co/edit/H5aiJz3xT6XbVbdwbdnQ?p=preview

matsko added a commit to matsko/angular.js that referenced this issue Sep 3, 2013
@matsko matsko closed this as completed in 36ad40b Sep 4, 2013
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Sep 25, 2013
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants