سؤال

<a href="#" class="removeme">Blah</a>

<div>Click on me to remove the class from anchor</div> 

Now if i click on div the class name should remove from anchor, i dont want to use any input element.

هل كانت مفيدة؟

المحلول 2

You can use ng-class, bind the class name to a scope var, and use ng-click to reset the var in the scope.

نصائح أخرى

You need to use ng-class instead of class attribute, then only you can handle this.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top