Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

Ion-select selectedText value

$
0
0

hi! below is the ionic 5 code snippet i am using now… however it does not work as expected.
i want to get the text from ion-select when the user make a selection and store the text in the input text name=“fishName”… i can only get the ion-select value but not the text.

//fish.ts

fishes = [{fishID:“1”,fishName:“AAA”}, {fishID:“2”,fishName:“BBB”}, {fishID:“3”,fishName:“CCC”}];

updateFish($event) {
let fishName=this.fishForm.get(“fishID”).text; //this text is not available

this.fishForm.patchValue({fishName:fishName});
}

//fish.html

{{ s.fishName }}

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>