vendredi 30 novembre 2018

How do I set a default value on a checkbox in Angular?

I have the following code:

< input type="checkbox" [(ngModel)]="i.checkt" [ngModelOptions]={standalone:true} (change)="recovery(i.checkt,i.TherapeuticArea)">

The problem I am facing is that with standalone:true every checkbox is checked by default and when standalone is false, the checkbox isn't working. Is there any way of setting the checkbox value to unchecked while having full functionality?




Aucun commentaire:

Enregistrer un commentaire