【发布时间】:2020-04-29 03:45:24
【问题描述】:
我的 html 中有这段代码
<mat-form-field>
<mat-label>Country</mat-label>
<mat-select (change)="selectOpt($event)" required formControlName="country">
<mat-option *ngFor="let country of countries" [value]="country.name" >
{{country.name}}
</mat-option>
</mat-select>
</mat-form-field>
每次选择不同的东西时,如何获取 select 的值?我的 mat-select 中有(更改)事件,但它没有捕捉到该事件
【问题讨论】:
标签: angular html-select onchange