This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
angular 1.3.0.rc0: Removing an item from ng-repeat move its DOM element at the end when animating #8918
Comments
Little update: it seems to work just fine in beta 18 and previous but broken since beta 19. You can test it by editing the script loading at the top of the HTML pane. Meaning the bug should be somewhere in there v1.3.0-beta.18...v1.3.0-beta.19 :-) |
Thanks for reporting. In 1.3.0-beta.19, there was no general animation code, just a few ngRepeat perf optimations; one relates to marking nodes removed by animation: 36e35b2 Could this be the cause @IgorMinar ? |
@Narretz it does look like that is the reason. Here 36e35b2#diff-f7b537c61e90325996f3c86b13cd53c4R374, |
Oops. I'll fix it today unless someone wants to do it. |
IgorMinar
added a commit
to IgorMinar/angular.js
that referenced
this issue
Sep 9, 2014
IgorMinar
added a commit
that referenced
this issue
Sep 9, 2014
…animated away During the recent refactoring a typo was made that broke code that detects if we are already removed from the DOM (animation has completed). Closes #8918
IgorMinar
added a commit
to IgorMinar/angular.js
that referenced
this issue
Sep 9, 2014
…animated away During the recent refactoring a typo was made that broke code that detects if we are already removed from the DOM (animation has completed). Closes angular#8918
ggershoni
pushed a commit
to ggershoni/angular.js
that referenced
this issue
Sep 29, 2015
…animated away During the recent refactoring a typo was made that broke code that detects if we are already removed from the DOM (animation has completed). Closes angular#8918
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Using ng-animate with an ng-repeat, when removing an element from the JavaScript array, I would expect the DOM element to stay at the same place it was while animating and then being removed. That's not what happening with the RC0 of Angular 1.3.
It looks like the DOM element is removed immediately and then Angular realizes it needs to animate it, so the element is put back in the DOM but at the end of the list, animated, and then finally removed for good.
I tried removing using different methods (
splice
andfilter
) and using stuff liketrack by
ororderBy
but nothing worked. Here is a demo showing the problem: http://codepen.io/pauldijou/pen/wevBrAm I missing something on how to remove an element from a ng-repeat?
The text was updated successfully, but these errors were encountered: