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

Setting ng-animate-children="false" doesn't work within ng-if #13865

Closed
jonrimmer opened this issue Jan 28, 2016 · 1 comment
Closed

Setting ng-animate-children="false" doesn't work within ng-if #13865

jonrimmer opened this issue Jan 28, 2016 · 1 comment

Comments

@jonrimmer
Copy link

See this plunkr:
https://plnkr.co/edit/7qDiemoxZhXMHnf8JpdH?p=preview

There is an ng-animate-children="true" directive applied to the <body> element, and a second ng-animate-children="false" directive applied to a descendant <ul> element. Despite the presence of this second, overriding directive, the list items continue to animate when their containing panel's visibility is toggled.

@Narretz
Copy link
Contributor

Narretz commented Jan 28, 2016

Looks like a valid bug. When ng-animate-children is on or inside an ng-if, the value only gets set after the animateQueue checks if the animations are allowed.

@Narretz Narretz added this to the 1.5.0 milestone Jan 28, 2016
@Narretz Narretz self-assigned this Jan 28, 2016
Narretz added a commit to Narretz/angular.js that referenced this issue Jan 28, 2016
Previously, ngAnimateChildren would set the data on the element
in an $observe listener. This is too late when the element is
animated immediately after compilation, as happens with ngIf

Closes angular#13865
Narretz added a commit that referenced this issue Jan 28, 2016
Previously, ngAnimateChildren would set the data on the element
in an $observe listener, which means the data was available after one digest happend.
This is too late when the element is animated immediately after compilation, as happens with ngIf.
Now the data is also set right in the linking function.

Fixes #13865
Closes #13876
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