Get selected ngModel value in Ionic?

I’m trying to get the value of the selected option, but I have no idea how I’m supposed to do that. Literally I spent 2-3 hours looking all over the internet. I just want to get the quantity when the Buy Now button is clicked.


    <ion-select [(ngModel)]="qty">
        <ion-option value="1" selected="true">1</ion-option>
        <ion-option value="2">2</ion-option>
        <ion-option value="3">3</ion-option>

<button ion-button full (click)="addToCart()">Buy Now</button>


export class ProductPage {
    qty: any;

    constructor(public navCtrl: NavController) {


    addToCart() {

qty should be a string instead of any, but your code works fine for me. I choose 2 from the menu, I press “buy now”, and the console shows “2”.

Aaah I realized where’s the problem! It returns undefined if it’s automatically selected. I’ll just set the first option to “Select Quantity” and use a check function. Thanks anyway!