如何使用材料选择控件在选择下拉控件内正确显示图标 . 选择mat选项后,它选择图标文本以及如何克服这个问题?
<mat-form-field>
<mat-select formControlName="genderFormControl" placeholder="Gender">
<mat-option>None</mat-option>
<mat-option *ngFor="let gender of genders" [value]="gender.value">
<mat-icon matListIcon>pregnant_woman</mat-icon>
{{gender.name}}
</mat-option>
</mat-select>
</mat-form-field>
1 回答
您可以通过 "mat-select-trigger" 选项完成它 .
关于 mat-select-trigger. 的更多文档