@jgmartinezm wrote:
This is my html code
<ion-item class="input-item item-has-value"> <ion-label position="floating">Tipo Trabajo</ion-label> <ion-select formControlName="idTipoTrabajo" cancelText="Cancelar" okText="OK"> <ng-container *ngFor="let subitem of tipoTrabajoList"> <ng-container *ngIf="subitem.id == item.idTipoTrabajo"> <ion-select-option [value]="subitem.id">{{ subitem.nombre }}</ion-select-option> </ng-container> </ng-container> </ion-select> </ion-item>
and this charge the page in your page.ts
onInit(){ this.generalForm = new FormGroup({ idJobType: new FormControl([this.item.JobType], Validators.compose([ Validators.required; }); }
When you change pages, a selected value does not return to the item. How can I do when loading the page, can I show the “item” of value “by default”?
The result is already compiled in this way.
Posts: 1
Participants: 1