Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

I want to edit the filled form but I don't get the value for the drop-down

$
0
0

@abdulkadhir wrote:

My html code

 <ion-item style="background-color:transparent">
    <ion-label required class="label">Class
      <span>
        <b style="color:red">*</b>
      </span>
    </ion-label>
    <ion-select [selectOptions]="selectOptions1" value="{{class}}" placeholder="Select Class" formControlName="class">

  <ion-option *ngFor="let class of plannerDetail.course.class; let i = index" (ionSelect)="setClassIndex(i)" value="{{class.id}}">{{class.course_name}}</ion-option>

    </ion-select>
 </ion-item>

my ts file:

placeForm: FormGroup;
class: AbstractControl;

constructor(){
this.placeForm.formBuilder.group({
placeId: [’’, Validators.required],
});
this.placeForm.get(‘class’).setValue(myArray.class);
}

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



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