Ionic 2: How to call a method when select value is changed
Instead of
<ion-select #C ionChange="onChange(C.value)">
...
</ion-select>
Since ionChange
is an event (and not a simple attribute) you need to do it like this:
<ion-select #C (ionChange)="onChange(C.value)">
...
</ion-select>
Instead of doing it this way
<ion-select #C (ionChange)="onChange(C.value)">
...
</ion-select>
you can also pass "$event" to get the value
<ion-select #C (ionChange)="onChange($event)">
...
</ion-select>