删除了Angular 6材质垫选择更改方法 [英] Angular 6 Material mat-select change method removed

查看:68
本文介绍了删除了Angular 6材质垫选择更改方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Angular Material Design 6中,删除了(更改)方法. 当用户更改选择时,我找不到如何替换更改方法以在组件中执行代码 谢谢!

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆