Angular 6 材料垫选择更改方法已删除 [英] Angular 6 Material mat-select change method removed
本文介绍了Angular 6 材料垫选择更改方法已删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 Angular Material Design 6 中,删除了 (change) 方法.当用户更改选择时,我找不到如何替换更改方法以执行组件中的代码谢谢!
In Angular Material Design 6, the (change) method was removed. I cant find how to replace the change method to execute code in the component when the user change selection Thanks!
推荐答案
将其从 change
更改为 selectionChange
.
<mat-select (change)="doSomething($event)">
现在
<mat-select (selectionChange)="doSomething($event)">
https://material.angular.io/components/select/api
这篇关于Angular 6 材料垫选择更改方法已删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文