我想在按下它之前或之后获得firebase密钥

时间:2019-02-10 23:59:05

标签: javascript firebase-realtime-database ionic3 angularfire2

早上好,我想获取推送数据的ID,但我不知道如何...这是在Firebase中进行数据推送的功能

saveToDatabase(){


      this.db.list(`/userProfile/${this.user}/expenseList`).push({
      store: this.data.merchantName.data,
      price: this.data.totalAmount.data,
      date: this.data.date.data,
      category: '',
      remark: '',
     }).then(data => {

     console.log(expenseId);
     const toast = this.toastCtrl.create({
     message: 'The Receipt was added successfully',
     duration: 3000
     });
       toast.present();
       this.goToUpdateExpense(expenseId);
     });
    }

我想将该键值传递给另一页,以便用户可以在下一页上查看它。

0 个答案:

没有答案