Skip to content Skip to sidebar Skip to footer

Angular 6: How To Access All Option Values In Mat-autocomplete Dropdown?

Given the example in the Angular docs you can see here and also repeated below, how can I access the rest of the object data in options? If for example, the object was more than

Solution 1:

I think you're looking for the onSelectionChange option:

You can simple add, to the mat-option:

(onSelectionChange)="setID(option.nameID)"

Everytime when you select a value this will be triggered.

Post a Comment for "Angular 6: How To Access All Option Values In Mat-autocomplete Dropdown?"