aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/raf.js
diff options
context:
space:
mode:
authorIgor Minar2014-03-17 15:48:09 -0700
committerIgor Minar2014-03-18 12:01:42 -0700
commit3dd9572754c7bafec30dd625f5c611346959c969 (patch)
tree31ed324303ffef13c31435e06d439635b54da79d /src/ng/raf.js
parent922cb7e42f1ff6c3f39342b96be472048ad9cb25 (diff)
downloadangular.js-3dd9572754c7bafec30dd625f5c611346959c969.tar.bz2
fix(Scope): $watchCollection should call listener with oldValue
Originally we destroyed the oldValue by incrementaly copying over portions of the newValue into the oldValue during dirty-checking, this resulted in oldValue to be equal to newValue by the time we called the watchCollection listener. The fix creates a copy of the newValue each time a change is detected and then uses that copy *the next time* a change is detected. To make `$watchCollection` behave the same way as `$watch`, during the first iteration the listener is called with newValue and oldValue being identical. Since many of the corner-cases are already covered by existing tests, I refactored the test logging to include oldValue and made the tests more readable. Closes #2621 Closes #5661 Closes #5688 Closes #6736
Diffstat (limited to 'src/ng/raf.js')
0 files changed, 0 insertions, 0 deletions