RE: How to get selected value from a select in Ionic?

How to get selected value from a select in Ionic?

ankit Senior Developer Asked on February 28, 2019 in IONIC.
Add Comment
1 Answers

Select.html

 

<ion-list>

<ion-list-header>Single Selection</ion-list-header>
<ion-item>

<ion-label>Gender</ion-label>

<ion-select [ngModel]="selected_value" (ionChange)="Getselected(selected_value)" [ngModelOptions]="{standalone: true}">

<ion-select-option value="f">Female</ion-select-option>

<ion-select-option value="m">Male</ion-select-option>

</ion-select>

</ion-item>
</ion-list>

Select.ts


Getselected(selected_value)

{

console.log("selector: ", selected_value );

}

Team Leader Answered on March 22, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.