Querying a firebase subcollection an show value in list


#1

need some help with Firebase and ionic.

In Firebase I have the following data structure:

Spieltermin (Collection) 
    - Meeting1 (Document)
    - Meeting 2 (Document) 
    - anwesenheit (Subcollection) 
        - te@te.de (Document) 
                - email (Value)
                - name (Value)
                - status (Value)

The App has a ionic List:
app

The html-code is:

  <ion-list>
        <ion-item *ngFor="let s of spieltermin | async" (click)="selectSpieltermin(s.musikgruppe,s)" >
          <h2> {{s.name}}</h2>
          <h3>   {{s.treffen| date: 'dd.MM.yyyy, H:mm' }} Uhr - {{s.musikgruppe}} </h3>
          <ion-badge item-end>260k</ion-badge>
          <ion-icon  [hidden]="true" ios="ios-checkmark-circle" md="md-checkmark-circle" item-end></ion-icon>
          <ion-icon ios="ios-close-circle" md="md-close-circle"item-end></ion-icon>
          <ion-icon ios="ios-help-circle" md="md-help-circle"item-end></ion-icon>
        </ion-item>
      </ion-list>

The ts-code is:

export class SpielterminePage {

  spieltermin: Observable<Spieltermin[]>;

  constructor(public nav: NavController, public navCtrl: NavController, public navParams: NavParams, 
    private ss: SpielterminService, ) {

 
    this.spieltermin = this.ss.getSpieltermineList();
  
  }

In the subcollection “anwesenheit” are documents with the values “status”.
value = true meens, that the person (find under subcollection -> value “name”) will take part of the meeting.

The person name is the user who is logged in.
How I can fetch the value “person” so that the icon in the list can change?

Many Thanks!