I have this code:
<i class="fa fa-eye" (click)="passclass($event)"></i>
I know that I can get the id of the element in the $event.
I was wondering is I can get the element's class too?
I have this code:
<i class="fa fa-eye" (click)="passclass($event)"></i>
I know that I can get the id of the element in the $event.
I was wondering is I can get the element's class too?
Update : Sorry, the solution I proposed works in Javascript but not properly in Angular
In fact you could instead use template variable like that :
<i #element class="fa fa-eye" (click)="passclass($event, element.classList)"></i>