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

fix(ngClass): keep track of old ngClass value manually #2020

Closed
wants to merge 1 commit into from

Conversation

provegard
Copy link
Contributor

ngClassWatchAction, when called as a $watch function, gets the wrong old
value after it has been invoked previously due to observation of the
interpolated class attribute. As a result it doesn't remove classes
properly. Keeping track of the old value manually seems to fix this.

Fixes #1637

ngClassWatchAction, when called as a $watch function, gets the wrong old
value after it has been invoked previously due to observation of the
interpolated class attribute. As a result it doesn't remove classes
properly. Keeping track of the old value manually seems to fix this.

Fixes angular#1637
@petebacondarwin
Copy link
Contributor

Hi @provegard - I beat you to it by one hour (#2018) but your unit test is cleaner than mine. I suggest we go with this PR. This also solves issue #2009

@provegard
Copy link
Contributor Author

Cool! I see that our solutions are nearly identical. Will the fix go into a
1.0.5 release as well as a 1.1.x release?

On Saturday, February 16, 2013, Pete Bacon Darwin wrote:

Hi @provegard https://github.com/provegard - I beat you to it by one
hour (#2018 #2018) but your
unit test is cleaner than mine. I suggest we go with this PR. This also
solves issue #2009 #2009


Reply to this email directly or view it on GitHubhttps://github.com//pull/2020#issuecomment-13647060.

@pkozlowski-opensource
Copy link
Member

@provegard yes, bug fixes should land both in 1.0.x and 1.1.x

@petebacondarwin
Copy link
Contributor

  • Contributor signed CLA now or in the past (if you just signed, leave a comment here with your real name)
  • PR doesn't introduce new api
  • PR doesn't contain a breaking change
  • PR contains unit tests
  • PR contains e2e tests (if suitable)
  • PR contains documentation update (if suitable)
  • PR passes all tests on Travis (sanity)
  • PR passes all tests on ci.angularjs.org (cross-browser compatibility)
  • PR is rebased against recent master
  • PR is squashed into one commit per logical change
  • PR's commit messages are descriptive and allows us to autogenerate release notes (required commit message format)
  • All changes requested in review have been implemented

@petebacondarwin
Copy link
Contributor

Hi Per. Have you signed the CLA?

@provegard
Copy link
Contributor Author

Yes I have.

On Monday, February 18, 2013, Pete Bacon Darwin wrote:

Hi Per. Have you signed the CLA?


Reply to this email directly or view it on GitHubhttps://github.com//pull/2020#issuecomment-13728459.

@ghost ghost assigned IgorMinar Feb 18, 2013
@IgorMinar
Copy link
Contributor

I have landed this change as 5f5d4fe

thanks for the contribution!

@IgorMinar IgorMinar closed this Feb 19, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ngClass broken in Angular 1.0.3?
4 participants