-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Callback "$animate:close" isn't called after an ng-leave animation finishes #6049
Comments
The better workaround would be to always issue animation callbacks on the parent element. Or to just further push out the leave DOM operation. I think the ladder is a good solution for 1.2.x. |
Some progress regarding this issue? |
Not yet. For consistency I think the parent element fix is the way to go. I'll just need to talk with @IgorMinar to see if this is OK for 1.3. |
Hello, I'm having the same issue here and I cannot figure out how to do the parent workaround as you described "The better workaround would be to always issue animation callbacks on the parent element.". Could you please provide an example? If you could edit the jsbin provided above to make it work with the parent fix, I would be really grateful :) Thanks |
Any progress on this? I don't see any workaround to detect completion of |
Sorry for the delay. Once #10067 is complete then I will hop over to this one. That issue requires a rather large refactoring and it needs to be figured out prior to this one. |
This issue still seems to exist in 1.4, is that correct? Any estimation on when it's done or any workaround? |
I have made a work around, it's kind of a dirty hack, but it works for me maybe it also works for others. The problem is caused by the parent no longer being available when the leave animation is finished (it's removed from the dom). My hack adds the option to listen to "*" instead of a dom element. So My code can be found here: https://github.com/urpro-bas/bower-angular-animate |
Just encountered this issue today. An update on the status of a solution would be great. |
Just ran into this. Really confusing behaviour. At the very least it should be mentioned in the $animate documentation if this phase will never fire for the "leave" event. Trying to write a scrollbar that will automatically update its handle after any transitions finish and now I need a dirty workaround! |
AS far as I can see, this works in 1.4: http://plnkr.co/edit/092B9gDPtqcJQ7q9WXXG?p=preview The event syntax has changed, though. |
If I try out your sample with version 1.5.2 (I only changed the script tags on index.html) then I missed the leave close event. Any ideas?? |
The $animate:after and $animate:close callbacks fire for ng-enter events but they do not fire for ng-leave events. Is this expected since the element/directive doesn't exist anymore? Is there a workaround besides using JS animations?
Example at http://jsbin.com/utOrAPO/11/edit?html,js,output
The text was updated successfully, but these errors were encountered: