lundi 2 décembre 2019

How to check the checkbox with the API response in Angular 6?

**I am getting the values from the API response for e.g 2,3,4.....Then my checkbox having value 2,3,4 should be check when the page is loaded. **

<div *ngFor="let name of processList; index as index;">
        <div class="col-md-3 float-left custom-control custom-checkbox ">
          <input type="checkbox" class="custom-control-input" [id]="name.Id" [value]="name.Value"
          (change)="saveProcessValues($event)">
          <label class="custom-control-label" [for]="name.Id"></label>
        </div>
      </div>



Aucun commentaire:

Enregistrer un commentaire