I have the following code for ion-select:
<ion-item class="drop-categoria" style="margin-bottom: 5%; ">
<ion-label>Categorias</ion-label>
<ion-select [(ngModel)]="catselected" (ng-change)="onChange(catselected)">
<ion-option *ngFor="let cat of categorias" [value]="cat.nome" >{{ cat.nome }}</ion-option>
</ion-select>
</ion-item>
And no .ts:
onChange(catselected){
console.log(catselected);
}
I need to get the selected value, in this case the cat.nome
, but when I click OK, nothing happens, no error, and no response, what can it be?