Ion-selected doesn't show the selected option

Using model driven form to select default option, so residence is already set:

<ion-select formControlName="residence">
   <ion-option [value]='"0"'>{{freeCalcForm.controls.partyAName.value}}</ion-option>
   <ion-option [value]='"1"'>{{freeCalcForm.controls.partyBName.value}}</ion-option>

I don’t see the selected value:
But clicking on the ion-select shows that the value is already selected correctly:

I tried selected=“true” and selected=“selected” on first option without any effect.

Are you absolutely certain that the residence control has its initial value set to “Self” by the time the template accesses it (by which I pretty much mean “in the component constructor”)?

Not so “Self” but to “0”. Yes it is set. Setting it to “1” successfully sets the Spouse as the default in the dropdown, with same issue of not showing it before clicking the select.

Is it possible that the double quotes are screwing things up? I still don’t really understand JavaScript’s type conversions.

IOW, does changing [value]='"0"' to value="0" change anything?

I already tried that. Same thing. Dropdown select is selected, but not shown.

Can you work backwards from this example (it works for me in a scratch testbed)?

form: FormGroup;

  constructor(fb: FormBuilder) {
    this.form ={
      fruit: ["banana"],
  <form [formGroup]="form">
    <ion-select formControlName="fruit">
      <ion-option value="apple">apple</ion-option>
      <ion-option value="banana">banana</ion-option>
      <ion-option value="cherimoya">cherimoya</ion-option>

“banana” is selected as expected.


its due to interpolation {{}} in the ion-option text…what a bummer…
this works just fine:

 <ion-select formControlName="residence">
              <ion-option value='0'>0</ion-option>
              <ion-option value='1'>1</ion-option>

Ah. It’s probably actually due to the way you’re referencing controls directly. That breaks. Instead try this:


Same probelm with this:

         <ion-select formControlName="residence">
          <ion-option value='0'>{{freeCalcForm.get('partyAName').value}}</ion-option>
          <ion-option value='1'>{{freeCalcForm.get('partyBName').value}}</ion-option>

I think you have hit #8561.

Ran today in the exact same issue :frowning:
The workaround in #8561 from 3dd13 didn’t work for me either.

Might be a little late to the game here, but ran into this issue today as well and I have come up with a workaround albeit not for all situations.

If in your TS file, you can push the options you want to an array variable, you can access them via interpolation and it adds to the form builder upon submission.

something like this in your TS
(for loop here)

in your HTML
<ion-option *ngFor="let item of testArray; let i = index " value="{{item}}" selected="i === 0">{{item}}</ion-option>

simple solution but requires a little extra legwork. Frustrating that it doesnt work like expected.

You solution worked perfectly for me after 2 days of struggle. Thank You!

Wao thank you so much. This answered my question about ion-select with formBuilder approach. now i do in the form init for the auto select of values present in the options. :pray::raised_hands:

I simply reset the values again in on the form object…
async ionViewDidLoad(){
await this.init();

This solution is working for me…

1 Like

This gave me the inspiration for my solution. Thanks!

The problem (I think) is that Ionic automatically decides what option to mark as selected only if the option’s value matches what you interpolate. Which is why @tenonic 's final solution worked.

With your solution, you manually decide when each option is selected. So if you don’t want to, you don’t have to put your options in an Array and loop for this to work. Say you have:

<ion-select [(ngModel)]="employment" placeholder="Are you employed?">
   <ion-option value="self-employed">Yes, I work for myself</ion-option>
   <ion-option value="employed">Yes, I work for a company</ion-option>
   <ion-option value="student">No, I'm a student</ion-option>

By default, when you select any of these options, you won’t see your selected value, but once you do this, you should be good:

<ion-select [(ngModel)]="employment" placeholder="Are you employed?">
   <ion-option value="self-employed" selected="employment === 'self-employed'">Yes, I work for myself</ion-option>
   <ion-option value="employed" selected="employment === 'employed'">Yes, I work for a company</ion-option>
   <ion-option value="student" selected="employment === 'student'">No, I'm a student</ion-option>


Adding timeout worked for me

setTimeout(_ => {

Super embarassing answer: in one case everything worked correctly - but my css was making the text the same color as the background. Hate when that happens.

Had the same issue, answered on this issue

I could workaround this using the compareWith attribute.

in the template :


and on ts :

compareFn(c1: any, c2: any): boolean {
        return c1 && c2 ? === : c1 === c2;

hope it helps