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

Description
enter: function(element, parent, after, done) {
if (after) {
after.after(element);
} else {
if (!parent || !parent[0]) {
/* caitp note: `after` is falsy here, what are we doing? */
parent = after.parent();
}
/* caitp note: I feel like if `after` is null, the expected behaviour would be
to prepend. I'm sure there's a precedent for this somewhere, but I
can't seem to find it on MDN. But someone on IRC was asking about
how to make $animate#enter() prepend rather than append. */
parent.append(element);
}
done && $timeout(done, 0, false);
},
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