How to get selected value from a select in Ionic?
How to get selected value from a select in Ionic?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Aviance School is one of the largest web solutions platform in India for developers to learn and share their programming knowledge and build their careers.
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 );
}