【发布时间】:2019-03-13 16:47:34
【问题描述】:
我想从 Firestore 中检索数据,但我似乎无法检索它。
在我的 user.ts 提供程序中
getUserEventData() {
var sDoc = this.afs.doc(`users/${this.afAuth.auth.currentUser.uid}`).collection('events').doc('volunteer');
sDoc.snapshotChanges().forEach(element => {
return element.payload.data;
});
}
firestore 索引
I want to retrieve the name/value of "Bandar Ku Ceria" imageLink
我如何在 profileUser.ts 上调用它
console.log(this.userProvide.getUserEventData);
我现在希望在控制台上显示“Bandar Ku Ceria”,在提供者 user.ts 中,我是否使用正确的方式从 firestore 调用数据?帮助。
【问题讨论】:
标签: typescript ionic-framework ionic3 google-cloud-firestore