mardi 21 avril 2020

Get value associated with native input element for Angular Material Checkbox and Radio Button

How do I access the value associated with angular material checkbox on change event?

<mat-checkbox color="primary" [checked]="selectedOptions[item.title]" 
            [value]="item" (change)="selectLeis($event)">
            
            <span class="count">()</span>
</mat-checkbox>

The $event returns MatCheckboxChange { source: MatCheckbox, checked: true/false } How do I access the item object?




Aucun commentaire:

Enregistrer un commentaire