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

ngAnimate doesn't work when you use ngView on the body #12874

Closed
deadwards90 opened this issue Sep 17, 2015 · 0 comments
Closed

ngAnimate doesn't work when you use ngView on the body #12874

deadwards90 opened this issue Sep 17, 2015 · 0 comments

Comments

@deadwards90
Copy link

http://plnkr.co/edit/PgfQaoDE5iCaxV2AX8OA

Example here. Basically it doesn't add the intermediate classes when showing and hiding.

The workaround is pretty simple, just don't use ngView on the body. In the example if you move ngView down onto a div it works fine.

There are a few scattered issues on stackoverflow where it does say you get some odd behaviour when adding ngView to the body but most of them aren't serious. If we shouldn't be doing this, I think there should be a warning in the docs about it.

matsko added a commit to matsko/angular.js that referenced this issue Sep 17, 2015
Relying on the body node to be present right at injection has
caused issues with unit testing as well as some animations on
the body element. Reverting this patch fixes these issues.

Closes angular#12874
matsko added a commit to matsko/angular.js that referenced this issue Sep 18, 2015
Prior to this fix anchoring would allow for a container to be a document
node or something higher beyond the body tag. This patch makes it fall
back to body incase the rootElement node exists as a parent ancestor.

Closes angular#12874
@Narretz Narretz modified the milestone: 1.4.7 Sep 18, 2015
@matsko matsko closed this as completed in 64ef084 Sep 22, 2015
matsko added a commit that referenced this issue Sep 22, 2015
Relying on the body node to be present right at injection has
caused issues with unit testing as well as some animations on
the body element. Reverting this patch fixes these issues.

Closes #12874
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants