CSS
<div class="checkbox-item">
<input type="checkbox" id="1" [(ngModel)]="filter" (change)="onFilterChange($event)"> CheckBox
</div>
<button (click)="filter = !filter">Change Status</button>
JavaScript
export class FilterStatus {
filter : false;
onFilterChange() {
console.log('Filter change called');
}
}
When I directly click on the checkbox, the change event is triggered. But when I click on the "Change Status" button, the checkbox status changes but the change event is not triggering. Can someone please provide insight on how to resolve this issue?