angular - Ionic 2 Dinamic Select, all options selected automatically -


i using ionic 2, have created select populated firebase:

        <ion-select formcontrolname="potentialpet">         <ion-option *ngfor="let potentialpet of potentialpets | async"                value="potentialpet.name">{{potentialpet.name}}</ion-option>      </ion-select> 

on selection choose 1 option choosing 1 option, selected.options

it seems problem related ion option value.

thanks in advanced.

the value should binding, change to

<ion-select formcontrolname="potentialpet">         <ion-option *ngfor="let potentialpet of potentialpets | async"                [value]="potentialpet.name">{{potentialpet.name}}</ion-option>      </ion-select> 

Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -