I am trying to replace the document.getElementById
from:
target = document.getElementById('checkBox') as HTMLInputElement;
I have tried:
- adding #target in html
- import ElementRef and ViewChild
- add @ViewChild('target') public target: ElementRef;
- this.target.nativeElement.checked = false;
and this does not seem to be working.