I'm trying to make the option appear selected in Ionic Select using the formControl, however it is not working, the value is set in the form, when I type console.log (this.form) the value of the field appears, but it does not appear in the select , is blank.
I'm using ionic 4 version.
HTML:
<!-- Analysis Mode -->
<ion-col size="12">
<ion-label class="custom-label" stacked>Modo de Análise</ion-label>
<ion-select formControlName="analysis_mode" interface="popover">
<ion-select-option value="1">Aleatório</ion-select-option>
<ion-select-option value="2">Sequencial</ion-select-option>
</ion-select>
</ion-col>
Form:
this.form = this.formBuilder.group({
analysis_mode: new FormControl(null, Validators.required),
value: new FormControl(null, Validators.required),
});
this.form.controls['analysis_mode'].setValue(1);