Sto usando Angular 2 (TypeScript).
Voglio fare qualcosa con la nuova selezione, ma quello che ottengo onChange()
è sempre l'ultima selezione. Come posso ottenere la nuova selezione?
<select [(ngModel)]="selectedDevice" (change)="onChange($event)">
<option *ngFor="#i of devices">{{i}}</option>
</select>
onChange($event) {
console.log(this.selectedDevice);
// I want to do something here with the new selectedDevice, but what I
// get here is always the last selection, not the one I just selected.
}