Junaid Ahmed
Junaid's Blog

Follow

Junaid's Blog

Follow

ionic multiple select reactive form

Junaid Ahmed's photo
Junaid Ahmed
·Aug 15, 2018·

1 min read

Play this article

ion-select multiple="true [formControl]="registerForm.controls.locations">
<ion-option value="f">Female</ion-option>
<ion-option value="m">Male</ion-option>
</ion-select>

buildForm() {
this.registerForm \= this.formBuilder.group({
'contact': ['', [Validators.required]],
'agree': [true, Validators.requiredTrue],
'categories': this.formBuilder.array([]),
'locations': [[], Validators.required], });
}

 
Share this