I have a list of object I want to use in a AutoComplete. When a option gets selected the formConttrol gets the value of the selected item. Now I don't care about the entire object, I only care about the ID.I changed the option to have the id as value, but then the textinput remains empty.
<mat-option *ngFor="let option of filteredOptions | async" [value]="option.id">
{{option.name}}
</mat-option>
Example: https://stackblitz.com/edit/angular-b97y6e-jwm2jq?file=src%2Fapp%2Fautocomplete-display-example.ts
Is there any way to use a object attribute as value?