uncheck all checkboxes typescript code example
Example: 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;
});
}