I want to set the [checked] property of the checkbox on a method call, but when I do that, the method is called but it doesn't change the status of the checkbox
HTML
<div*ngFor="let vest_style of VEST_STYLE">
<input type="checkbox" value="" (change)="onCheckboxChange($event,i)"
[checked]="isCheckedFromOrder(vest_style._id)">
</div>
TS
isCheckedFromOrder(id) {
this.styles.value.forEach(style => {
console.log(style === id)
return style === id
})
}
Aucun commentaire:
Enregistrer un commentaire