lundi 6 mai 2019

How to get checkbox change event in angulat 6?

In my app, I have used one component which returns me checbok in html.

this.cell.newValue = this.sanitizer.bypassSecurityTrustHtml('<input type="checkbox" (change)="test($event)">');

I didn't get it's event. For a now I have set code in both component.

test(event){
   console.log("Checkbox clicked...");
   console.log(event.currentTarget.checked);
}

Any one has any idea on this issue ?




Aucun commentaire:

Enregistrer un commentaire