문제

<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