Im trying to execute a function when a checkbox has been ticked/unticked but wasnt able to get the checkbox.checked as it is showing as undefined.
html:
<input type="checkbox" (change)="eventCheck($event)" />
typescript:
eventCheck(event){
console.log(event.checked) <--- this is undefined
}
note: I was able to get the event object but im not sure which property to check if the checkbox has been checked or not.
Can you guys help me with this? thanks!