Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229745

Cannot set property 'id' of null

$
0
0

Hi,

I need to fetch data from firebase...:

currentBill: any = {};

ionViewDidEnter(){
      this.firebaseData.getBillDetail(this.navParams.get('billId'))
      .on('value', snapshot => {
        this.currentBill = snapshot.val();
        this.currentBill.id = snapshot.key;
      });
    }

The firebase provider has following:

getBillDetail(billId: string): firebase.database.Reference{
  return firebase.database().ref('/Bill' + billId).child(billId);
}

Not sure, what am I missing here?


Viewing all articles
Browse latest Browse all 229745

Trending Articles