0
我需要检索和订阅特定用户的事件。我也需要事件的关键。Angular | Firebase - 检索特定用户的数据
getEvents(uid) {
this.db.object(`eventsGuestsLookup/${uid}`).valueChanges()
.subscribe(e => {
for (const k in e) {
if (e.hasOwnProperty(k)) {
this.eventsRef = this.db.object(`events/${k}`);
this.eventsRef.snapshotChanges().subscribe(action => {
console.log(k);
console.log(action.payload.val());
this.events = this.eventsRef.valueChanges();
});
}
}
})
}
现在我有一个事件列表,但没有定义event.name
。
{{event.name}}