Angular 6 Material mat-select change method removed

Fernando Lacoumette picture Fernando Lacoumette · May 7, 2018 · Viewed 127.1k times · Source

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!

Answer

VtoCorleone picture VtoCorleone · May 8, 2018

The changed it from change to selectionChange.

<mat-select (change)="doSomething($event)">

is now

<mat-select (selectionChange)="doSomething($event)">

https://material.angular.io/components/select/api