How to receive information from firebase on an ion-select?

0

Hello, I'm having difficulty retrieving information already stored in other registers on an ion-select. In a previous registration the Place is already registered and in a second register I would like to receive in an ion-select a list of all the Locations that have already been registered before.

I need only the names of Locations and I can save this name. in local.local. Here is code that you are saving manually without rescuing from the so option bank.

<ion-item>
      <ion-label>Local</ion-label>
      <ion-select [(ngModel)]="item.local" placeholder="Local">
        <ion-option value="Frente 1">Frente 1</ion-option>
        <ion-option value="Frente 2">Frente 2</ion-option>
        <ion-option value="Frente 3">Frente 3</ion-option>
        <ion-option value="Frente 4">Frente 4</ion-option>
        <ion-option value="Frente 5">Frente 5</ion-option>
      </ion-select>
    </ion-item>
    
asked by anonymous 24.06.2018 / 07:15

1 answer

0

That would be the answer, for anyone who is in trouble like I was.

<ion-item>
  <ion-label>Status</ion-label>
      <ion-select  [(ngModel)]="item.status" placeholder="Status">
        <ion-option *ngFor="let status of statusList$ | async" value={{status.name}}>{{status.name}}</ion-option>
      </ion-select>
    </ion-item>>
    
26.06.2018 / 01:55