Angular firebase getting document details

document.data() » will return all the data on that particular doc

document.id » will return the id of the document

<ion-content class="ion-padding">
  <ion-card *ngFor="let opportunity of opportunities">
    <ion-card-header>
      <ion-card-title></ion-card-title>
    </ion-card-header>
    <ion-item>
      
    </ion-item>

    <ion-item>Posted by  | 
      create  ago 
    </ion-item>

    <ion-buttons>
      <ion-button (click)="onApply(opportunity.id)" *ngIf="this.student">  // to pass the id to another method
        <ion-icon name="add"></ion-icon>
        Apply Now
      </ion-button>
    </ion-buttons>
  </ion-card>
</ion-content>

Leave a Comment

Your email address will not be published. Required fields are marked *