Please sign in to comment.
fix($animate): insert elements at the start of the parent container i…
…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 these two APIs. With this change, if the `after` argument is not specified for either `$animate.enter` or `$animate.move`, the new child element will be inserted into the first position of the parent container element. Closes #4934 Closes #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 all instances of `$animate.enter()` or `$animate.move()` from: `$animate.enter(element, parent);` to: `$animate.enter(element, parent, angular.element(parent.lastChild));`
- Loading branch information...
Showing with 19 additions and 10 deletions.