I have a question regarding how to automatically check a checkbox under certain conditions. Specifically, I have a situation where the accept()
function triggers the onApprovedDateChecked()
function with a true parameter. When this happens, I need the checkbox to be checked. Can anyone assist me in resolving this issue?
component.html
<p-checkbox label="dsd" formControlName="fcont" binary="true"
(onChange)="onChecked($event)"></p-checkbox>
component.ts
accept(){
onChecked(true)
}
onChecked(e: any){
//make the checkbox to checked
}