Answers for "uncheck all checkboxes typescript"

0

uncheck all checkboxes typescript

html
<input #checkboxes type="checkbox">
...
<button type="button" (click)="uncheckAll()"></button>

ts file
@ViewChildren("checkboxes") checkboxes: QueryList<ElementRef>;

uncheckAll() {
  this.checkboxes.forEach((element) => {
    element.nativeElement.checked = false;
  });
}
Posted by: Guest on April-05-2021

Code answers related to "uncheck all checkboxes typescript"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language