Angular 6 Material mat-select change method removed

后端 未结 5 922
小蘑菇
小蘑菇 2020-12-07 19:39

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

5条回答
  •  时光说笑
    2020-12-07 20:18

    For me (selectionChange) and the suggested (onSelectionChange) didn't work and I'm not using ReactiveForms. What I ended up doing was using the (valueChange) event like:

    
    

    And this worked for me

提交回复
热议问题