mercredi 8 janvier 2020

mat-checkbox and checked value (A) or checked value (D)

I want to check the checkbox the value you receive is an A and if a D is not checked.

<mat-checkbox formControlName="active" trueValue="A" falseValue="D">Activa</mat-checkbox>

trueValue and falseValue do not do anything.

receive the data as form:

this.form = this.fb.group({
  active:['' , Validators.required]
});



Aucun commentaire:

Enregistrer un commentaire