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.
Open http://jsfiddle.net/ADukg/224/
Set ngclass to true by clicking the first button. Note how the ngclass text turns green.
Then set class to true by clicking the second button. Note how the ngclass text turned red again.
So: Result: div element has class="static class", thus coloring "class" green and "ngclass" red Expected result: div element has class="static class ngclass", thus coloring both "class" and "ngclass" green
I have a (maybe very ugly) fix for this, which involves:
Not setting attr[name] to undefined when name === 'class' in addAttrInterpolateDirective()
$watch:ing $interpolate(attr['class']) in classDirective() and reapplying the "ngclasses" when it changes.
The reason I'm not totally sure about this solution is that I don't know why you're setting attributes to undefined in addAttrInterpolateDirective(), and I'm not sure what consequences it will have if we don't.
What do you think about this?
I can post some more code later, but I want to see if all tests pass first.