Reputation: 157
I am using Ionic 2, I have created a select populated with firebase:
<ion-select formControlName="potentialPet">
<ion-option *ngFor="let potentialPet of potentialPets | async"
value="potentialPet.name">{{potentialPet.name}}</ion-option>
</ion-select>
On selection I choose one option choosing one option, but then all are selected.options
It seems like a problem related to the ion option value.
Upvotes: 1
Views: 494
Reputation: 587
the value should be binding, so change to
<ion-select formControlName="potentialPet">
<ion-option *ngFor="let potentialPet of potentialPets | async"
[value]="potentialPet.name">{{potentialPet.name}}</ion-option>
</ion-select>
Upvotes: 3