@almufadhdhal wrote:
this is my view
<ion-item> <ion-label floating style="color:red">Shipping Address</ion-label> <ion-select [(ngModel)]="data.office_code" name="office_code" ([ngModel])="selectedItem" (ionChange)="onItemSelection(selection)"> <ion-option *ngFor="let data of ofcode" [value]="data.office_code"> {{data.title_address}} </ion-option> </ion-select> </ion-item>
this is my controller
public onItemSelection(selection) { if ( selection != undefined) { console.log(selection); console.log('bbbbbbb'); console.log(this.ofcode); } else { console.log(this.selectedItem); console.log('lalalalala'); console.log(this.ofcode); /*console.log(selection.data.office_code);*/ } }
how can i get value from selected item?
Posts: 1
Participants: 1