So, i have a piece of html that includes a mat-form-field who have a mat-select and an mat-option. Those mat-options are generated from the server and they have an image that i need to display in the mat-select when an option is selected(every option has his own image)
<mat-select>
<ng-container
*ngFor="let option of options">
<mat-option>
<!-- Image -->
<img
height="24px"
[src]="option[optionLabelImgKey]"/>
!-- Label -->
{{option[optionLabelKey] | translate}}
</mat-option>
</ng-container>
</mat-select>
I want to display the optionLabel and the image in the mat-select every time a new option is selected.
I've read about mat-select-trigger but nothing works for me.