我已经使用 selectionChange 事件创建了一个 mat-select,但是当值更改时,该事件不会被触发。
.html 文件
<mat-select (selectionChange)="changeCategory()">
<mat-option *ngFor="let category of categoryList" [value]="category._id">{{category.name}} </mat-option> </mat-select>
ts文件
changeCategory(){
console.log('ok')
}