Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$animate.enter with third parameter in 1.4.x #11848

Closed
@Foxandxss

Description

@Foxandxss

I have been doing $animate.enter() for a while in Angular 1.3.x in the following way:

$animate.enter(element, parent, parent[0].lastChild);

So instead of adding a new element at the beginning of parent, I add them after the last item on parent.

That worked good, but after I updated to Angular 1.4.x, it says that what I pass as the third parameter parent[0].lastChild doesn't have the after method. That suggested to me that I needed to wrap that element into angular.element:

$animate.enter(element, parent, angular.element(parent[0].lastChild));

And that did work. The thing is, I tried to replicate this issue on a plunker and it didn't work either in 1.3.x if I don't wrap the third parameter.

So my question is: Having to wrap the third parameter with angular.element was always needed? Or maybe with the whole refactor it needs it now?

It surely fixed it to work with 1.3.x as well but it feels weird now.

There is a plunker

Maybe I am doing it wrong, but it worked for me in the past when it was just after.after.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions