i Am getting the value check in console but the checkbox is not showing checked.
the code and console is given below
<input type = "checkbox" (click)="selectCutype('single',cutType.id)" id="cutType" (change)="changeCheckbox(i)" >
this.array = self.fifthSector.attribute_value_id.split(',');
console.log('array',this.array)this.array.forEach((elem1, index) => {elem1;
console.log(elem1)
res[0].cut_type_sub.forEach((elem2, index) => {elem2;
console.log(elem2.id)
if(elem1 == elem2.id)
{
//--If elem1 equal elem2
this.fish_cuttype[index].checked = !this.fish_cuttype[index].checked;
console.log('Done',elem1 == elem2.id,this.fish_cuttype[index])
}
});
Aucun commentaire:
Enregistrer un commentaire