Kindly see the below object array.i am displaying all group description value along with checkbox. i m trying to disable B and C group but as values are coming dynamic, all checkbox values are getting disabled.how can i disable particular group checkbox here.
[{groupId: "4", groupDesc: "A"},
{groupId: "12", groupDesc: "B"},
{groupId: "23", groupDesc: "c"},
{groupId: "34", groupDesc: "D"}]
for(var i=0;i<array.length;i++)
{
if(array[i].groupDesc == B || array[i].groupDesc == c)
{
this.disablecheckbox = true;
}
}
<ng-container *ngFor="let value of array;let i = index;">
<input type="checkbox" pattern="[0-9]{10}" [disabled]="disablecheckbox == true" value="{{ value.GroupId }}" /><i class="skin"></i><span style ="width: 150px;">{{ value.groupDesc }}</span>
</ng-container>
this? That's doesn't seems to be disabling the checkboxes