You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
While upgrading an app from 1.3 to 1.4, I've found that ng-show can show the wrong result when ngAnimate is included on the page. In the Plunkr, the div should be hidden, but it's shown.
Versions: 1.4.0+ (1.4.0-rc.2 is the last version that doesn't have this bug) Browser/OS: I've tested with Chrome and Firefox on OS X and it's always reproducible in both.
Here's the commit range where I believe the bug was introduced: 0681a54...291d7c4 (between 1.4.0-rc.2 and 1.4.0)
The closest issue I found is #11717, which was fixed, but seems related.
Observations:
If you remove ngAnimate from the module or switch to ng-if, the div is properly hidden.
The ng-show condition relies on 2 variables. The values of the variables are printed to the console in the plunkr, and the progression goes like this:
The condition for the ng-show is !loading && !results.length. I think that second iteration where loading is false and results.length is 0 is what's throwing things off.
Tagging @matsko since he seems to be the expert in this area.
The text was updated successfully, but these errors were encountered:
Keep in mind that there hasn't been a release for a few weeks just yet. 1.4.4 will come out this week and that includes this fix that is present in snapshot.
Plunkr: http://plnkr.co/edit/dlBOem
Overview
While upgrading an app from 1.3 to 1.4, I've found that
ng-show
can show the wrong result whenngAnimate
is included on the page. In the Plunkr, thediv
should be hidden, but it's shown.Versions: 1.4.0+ (1.4.0-rc.2 is the last version that doesn't have this bug)
Browser/OS: I've tested with Chrome and Firefox on OS X and it's always reproducible in both.
Here's the commit range where I believe the bug was introduced: 0681a54...291d7c4 (between 1.4.0-rc.2 and 1.4.0)
The closest issue I found is #11717, which was fixed, but seems related.
Observations:
If you remove
ngAnimate
from the module or switch tong-if
, thediv
is properly hidden.The
ng-show
condition relies on 2 variables. The values of the variables are printed to the console in the plunkr, and the progression goes like this:The condition for the
ng-show
is!loading && !results.length
. I think that second iteration whereloading
isfalse
andresults.length
is0
is what's throwing things off.Tagging @matsko since he seems to be the expert in this area.
The text was updated successfully, but these errors were encountered: