My code is the following, but it doesn't work, what i want is to activate the effect once button clicked. //TS
@ViewChild('icono', { read: ElementRef })icono: ElementRef;
execEffect() {
let x = this.icono
x.nativeElement.classList.add('bounce')
}
//HTML
<img #icono src="../../assets/something.png" style="width:60px;" (click)="execEffect()"/>
I recommend you to use Renderer 2...
I made and example four you...