在我的Angular material项目中,我有一个简单的 Select 选项表单字段:
component.html
<mat-form-field>
<mat-select [(value)]="modeSelect" placeholder="Mode">
<mat-option value="domain">Domain</mat-option>
<mat-option value="exact">Exact</mat-option>
</mat-select>
</mat-form-field>
其中,[(value)]="modeSelect"
绑定到Component.ts文件中的modeSelect属性
我想让它在页面加载时默认 Select <mat-option value="domain">Domain</mat-option>
.
ng-selected
不适合我