Answers for "uncheck checkbox typescript with condition"

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
-2

typescript on checkbox checked

<input type="checkbox"  id="isCheckBox" (change)="yourfunc($event)"/>
Posted by: Guest on December-14-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language