I don’t see where country is defined in your controller, so I don’t know whether this is a bug or not, but it adds to the confusion that is the main issue here, which is that you have too many things fighting for control over this select component.
When you are using reactive forms, the [formControl] or formControlName binding should be the only thing that manages the input component’s value. There should be no ngModel, and no ionChange.
So the good news is that I think that the way that you should be watching changes on this component for stylistic/readability reasons is also going to give the information you are looking for: subscribe to the valueChangesObservable of the countryFormControl in your controller.
I would also highly recommend getting rid of every property you reference in your post aside from userForm: userAccount, userId, and mycountry. They will become stale as the user edits things using the form controls, and stale data is one of the biggest sources of hard-to-track bugs in all software, especially in web apps.
Thanks for the feedback. I removed ionChange() and used valueChanges, and it works great. But now, nothing is preselected when the form loads. How do I preselect a value?
The form is for a user to update his/her info, so the user’s country should be preselected when the form loads.
countrycode is not the same as country, so I don’t think you’re accessing the right control. This is partially why I never use formControlName. I put each FormControl into a separate controller property and bind [formControl] instead. That way my IDE and build tools catch typos that can’t get caught when you write controls['countrycode'], and (although this is admittedly very minor on modern hardware) it saves a needless hash table lookup.
I didn’t understand why this existed in the first place, I don’t understand why it’s there now. There must be something else in your actual code that you’re not posting - that shouldn’t even compile, let alone do anything useful. I would not consider this a sustainable state of affairs, but rather a step backwards into spaghetti.
Create a different topic for this issue: it’s unrelated. Incidentally, see this thread for a discussion of why you don’t need asObservable here (or, arguably, anywhere).