1
我在頁面中設置了下拉菜單,但是如何獲得選擇的值。我用如何從下拉菜單中獲取選定的值2
<ion-item>
<ion-label>MemberType</ion-label>
<ion-select [(ngModel)]="selectedvalue" #item >
<ion-option *ngFor="let item of items" value="{{item.value}}" checked="{{item.checked}}">{{item.text}}</ion-option>
</ion-select>
</ion-item>
items: Array<{ value: number, text: string, checked: boolean }> = [];
this.items.push({ value: 1, text: 'Super Distributor', checked: false });
this.items.push({ value: 2, text: 'Distributor', checked: false });
this.items.push({ value: 3, text: 'Retailer', checked: false });
this.items.push({ value: 4, text: 'End User', checked: false });