【发布时间】:2018-12-12 16:06:52
【问题描述】:
AngularFire2 v5 没有适当的文档,所以我不知道我应该从哪里学习,但这里只适用于 Firestore。我不使用 Firestore,我使用 Firebase 实时数据库。 https://github.com/angular/angularfire2/tree/master/docs
但是,我对它很陌生,我正在研究如何将数据存储在集合中,看起来像这样:
nepal-project-cffb1:
users:
userid:
email: "lajmis@mail.com"
score: 1
我的函数现在看起来像这样:
this._db.list("users/" + "id").set({
email: this.user,
score: this.score
})
但它不起作用,我收到Expected 2 arguments, but got 1. 错误。有一堆语法,比如.ref.list,我不知道用哪个。
【问题讨论】:
-
我希望例如如何使用 valueChanges() 存储而不是检索。我正在寻求帮助,如何按照我在 OP 中提供的数据结构来做到这一点。该文档对初学者不友好,因此我在这里寻求帮助。
标签: json angular firebase angularfire2