How to receive firebase information on an ion-select?

Asked

Viewed 219 times

1

Hello, I’m having difficulty recovering information already stored in other registrations in an ion-select. In a previous registration the Local is already registered and in a second registration would like to receive in an ion-select a list of all Places that have been registered before.

I only need the names of the Locations and it is possible to save that name. in item.local. Follows code that is saving manually without rescuing from the bank so option.

<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>

1 answer

0

That would be the answer, for those in trouble as 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>>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.