lundi 14 février 2022

How can I disable two textboxes when a checkbox is checked? I am using Angular 6

form.html

<input id="okornot" class="form-check-input" type="checkbox" name="chkbx1" formControlName="" (change)="checkBelts($event)" />

form.ts

checkBelts(val, event) {
    this.checkBelt = val.target.checked;

    if (val.target.checked == true) {
      this.txtcheck = false;
    } else {
      this.txtcheck = true;
    }
    console.log("value", this.txtcheck);
  }



Aucun commentaire:

Enregistrer un commentaire