I am trying to get the selected option Value from ion-select
but when I select any value from ion-select I am getting Undefined value since I am new to ionic
I was unable to sort it on my own.
HTML:
<ion-item>
<ion-label>Quantity</ion-label>
<ion-select [(ngModel)]="number"
(ionChange)="onChange(carbrand)" >
<ion-option *ngFor="let count of quantity"
[value]="count" >{{count}}</ion-option>
</ion-select>
<!-- <ion-select [(ngModel)]="number">
<ion-option *ngFor="let count of quantity"
value="count"></ion-option>
</ion-select> -->
</ion-item>
Home.ts :
onChange(SelectedValue){
console.log("Selected Quantity", SelectedValue);
}