diff options
| author | Matias Niemelä | 2013-11-18 22:13:28 -0500 | 
|---|---|---|
| committer | Matias Niemelä | 2013-11-21 20:47:44 -0500 | 
| commit | 0cd7e8f22721f62b62440bb059ae764ebbe7b42a (patch) | |
| tree | 6eeb56d123d2bc4c2417b80f1f64079eb2b97059 /test/ng/directive | |
| parent | ba1b47f85b771f8221db58a46b58429375b0ee6e (diff) | |
| download | angular.js-0cd7e8f22721f62b62440bb059ae764ebbe7b42a.tar.bz2 | |
fix($compile): ensure CSS classes are added and removed only when necessary
When $compile interpolates a CSS class attribute expression it will
do so by comparing the CSS class value already present on the element.
This may lead to unexpected results when dealing with ngClass values being
added and removed therefore it is best that both compile and ngClass delegate
addClass/removeClass operations to the same block of code.
Diffstat (limited to 'test/ng/directive')
| -rw-r--r-- | test/ng/directive/ngClassSpec.js | 2 | 
1 files changed, 0 insertions, 2 deletions
| diff --git a/test/ng/directive/ngClassSpec.js b/test/ng/directive/ngClassSpec.js index 62733c85..c7307069 100644 --- a/test/ng/directive/ngClassSpec.js +++ b/test/ng/directive/ngClassSpec.js @@ -321,7 +321,6 @@ describe('ngClass animations', function() {        $rootScope.val = 'one';        $rootScope.$digest();        $animate.flushNext('addClass'); -      $animate.flushNext('addClass');        expect($animate.queue.length).toBe(0);        $rootScope.val = ''; @@ -428,7 +427,6 @@ describe('ngClass animations', function() {        //this fires twice due to the class observer firing        className = $animate.flushNext('addClass').params[1]; -      className = $animate.flushNext('addClass').params[1];        expect(className).toBe('one two three');        expect($animate.queue.length).toBe(0); | 
