Reputation: 773
I have this code and I am wondering how can I be able to show the selected value on the label. Thank you!
Upvotes: 0
Views: 102
Reputation:
This should do the trick : stackblitz
<mat-form-field>
<mat-select #select [placeholder]="selectedLanguage?.value?.value || 'Language'" (selectionChange)="selectedLanguage = $event"
panelClass="panelResponsive">
<mat-option *ngFor="let language of filteredLanguages" [value]="language">
<span>{{language.value}}
</span>
</mat-option>
</mat-select>
</mat-form-field>
Upvotes: 2