lundi 6 juillet 2020

Angular 8: [checked] not working when using #label

I have this pretty basic checkbox in my Angular 8 application:

<input #credentialType type="checkbox" class="form-checkbox"
             [checked]="credential.id === 'MyID'"
             [id]="credential.id"
             [value]="credential.id"
             [attr.aria-label]="credential.id"
             [attr.aria-checked]="credentialType.checked"
             (change)="toggleCredential($event)"/>

My... challenge is that the [checked] property does not work alongside the #credentialType label.

What am I missing here?




Aucun commentaire:

Enregistrer un commentaire