dimanche 19 avril 2020

Make checked checkbox disable in angular 8

I have two checkboxes checked when form loads.. i want to make this checked one as disable.. but when i sued disabled property values also getting null.. how to solve this? This what i have tried

<div class="row" *ngIf="additionalCoverArray">
        <div class="col-md-6">
          <div class="row">
            <div class="col-md-6" *ngFor="let objCheckbox of additionalCoverArray; let i=index">
              <input type="checkbox" [(ngModel)]="objCheckbox.isMandatory" [disabled]="objCheckbox.isMandatory" id="" name="" value="" (change)="toggleVisibility($event)">
              <label></label>
            </div>
          </div>
        </div>
      </div>



Aucun commentaire:

Enregistrer un commentaire