ng-class does not remove a class that was there before angular was bootstrapped

Viewed 6998

Still under 72 hours coming up to speed with angular. Having used knockout for a while, I have to say it's interesting. My question right now has to do with ng-class.

Say I have the following:

<div class="myClass" ng-class="{myClass: false}">

When angular bootstraps, it does not remove the myClass attribute that was rendered there before. I had expected it to, since that's what ko's css binding does. It seems that angular only removes the class if angular was the one who put it there.

So, is there a common workaround for this? Other than creating a custom directive?

1 Answers
Related