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.
We can use a workaround to show that the animate would actually work. All we need to do is to wrap the directive in yet another div. So it seems it has something to do with the root element of the view being a custom directive.
Another thing to note here is that the setup class is never removed in this case. The way I understand it all animation classes should automatically be removed at the end.
The text was updated successfully, but these errors were encountered:
Thinking a bit more about the problem I wonder if this has something to do with the directive using replace: true. It seems to be fixable by configuring the directive to not replace but append instead.
I created a updated fiddle that now works but uses replace: false instead:
However, even if I switch to replace: false it doesn't work until I switch the directive from element to attribute syntax (That has nothing to do with angular. It's more that elements are by default rendered as inline elements so one needs to add a css rule to set it to display:block):
So at the moment it seem the issue boils down to not working together with replace: true. I wonder if there is something that can be done about that?
I guess what should happen is that the view should be compiled first and then the animation classes should be added to the top level element of the view. Because then it's safe to add them since the elements are already final.
However, I have too less insight in how things work and if it really can be done that way.
Here is a working example that uses ng-view and where the injected views start with a custom directive:
http://jsfiddle.net/cburgdorf/dLbga/
Now add
ng-animate
to it and see how it fails:http://jsfiddle.net/cburgdorf/7W3KQ/
We can use a workaround to show that the animate would actually work. All we need to do is to wrap the directive in yet another div. So it seems it has something to do with the root element of the view being a custom directive.
http://jsfiddle.net/cburgdorf/nFhX8/
Another thing to note here is that the
setup
class is never removed in this case. The way I understand it all animation classes should automatically be removed at the end.The text was updated successfully, but these errors were encountered: