This repository has been 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.5k
$animate#enter logic does not totally make sense #6275
Labels
Comments
I would like to prepend also. I am creating a factory/directive which pop up some alert boxes. Since it is a rewriting from an jQuery plugin and it supports both prepend and append, I would love to be able to stack the alerts in the other way (prepend). |
matsko
added a commit
to matsko/angular.js
that referenced
this issue
Apr 1, 2014
…nstead of at the end BREAKING CHANGE: $animate will no longer place elements at the end of the parent container when enter or move is used with a parent container element. Any former directives that rely on this feature must be slightly modified to work around this fix. The same effect can be achieved by finding the final element in the parent container list and using that as the after element (which is the 3rd argument in the enter and move $animate operations). Closes angular#4934 Closes angular#6275
matsko
added a commit
to matsko/angular.js
that referenced
this issue
Apr 1, 2014
…nstead of at the end $animate.enter and $animate.move both insert the element at the end of the provided parent container element. If an after element is provided then they will place the inserted element after that one. This works fine, but there is no way to place an item at the top of the provided parent container using both these functions. This commit fixes this issue. BREAKING CHANGE: $animate will no longer place elements at the end of the parent container when enter or move is used with a parent container element. Any former directives that rely on this feature must be slightly modified to work around this fix. The same effect can be achieved by finding the final element in the parent container list and using that as the after element (which is the 3rd argument in the enter and move $animate operations). Closes angular#4934 Closes angular#6275
matsko
added a commit
to matsko/angular.js
that referenced
this issue
Apr 3, 2014
…nstead of at the end With 1.2.x, $animate.enter and $animate.move both insert the element at the end of the provided parent container element when only the parent element is provided. If an after element is provided then they will place the inserted element after that one. This works fine, but there is no way to place an item at the top of the provided parent container using both these functions. Closes angular#4934 Closes angular#6275 BREAKING CHANGE: $animate will no longer default the after parameter to the last element of the parent container. Instead, when after is not specified, the new element will be inserted as the first child of the parent container. To update existing code change any instances of $animate.enter() or $animate.move() from: $animate.enter(element, parent); to: $animate.enter(element, parent, angular.element(parent[0].lastChild));
matsko
added a commit
to matsko/angular.js
that referenced
this issue
Apr 3, 2014
…nstead of at the end With 1.2.x, $animate.enter and $animate.move both insert the element at the end of the provided parent container element when only the parent element is provided. If an after element is provided then they will place the inserted element after that one. This works fine, but there is no way to place an item at the top of the provided parent container using both these functions. Closes angular#4934 Closes angular#6275 BREAKING CHANGE: $animate will no longer default the after parameter to the last element of the parent container. Instead, when after is not specified, the new element will be inserted as the first child of the parent container. To update existing code change any instances of $animate.enter() or $animate.move() from: `$animate.enter(element, parent);` to: `$animate.enter(element, parent, angular.element(parent[0].lastChild));`
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
note I did sort of post this before doing a proper investigation to see how broken this is, but I'll do a quick test and close this if I think the behaviour is acceptable.
Oh, the IRC user posted an issue re: this too, #6274. Anyways, taking a quick look
http://plnkr.co/edit/qECZ0VMVLCMDugY9Usat?p=preview (quick example which demonstrates the TypeError)
http://plnkr.co/edit/8gUgr5uqFhOV9nmquzQB?p=preview (quick example showing the sort of unexpected behaviour) --- I'm not totally sure if this is a huge problem, but it seems that people want to be able to prepend
The text was updated successfully, but these errors were encountered: