This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ngClass): should remove classes when object is the same but prope…
…rty has changed If you wire up ngClass directly to an object on the scope, e.g. ng-class="myClasses", where scope.myClasses = { 'classA': true, 'classB': false }, there was a bug that changing scope.myClasses.classA = false, was not being picked up and classA was not being removed from the element's CSS classes. This fix uses angular.equals for the comparison and ensures that oldVal is a copy of (rather than a reference to) the newVal.
- Loading branch information
1 parent
4652386
commit 0ac969a
Showing
2 changed files
with
18 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters