【发布时间】:2021-02-16 16:18:43
【问题描述】:
我正在尝试使用 Angular 获取 firebase 对象,我成功地做到了。但是,我不确定如何更深入地了解返回的内容(下图)。
What is returning now 和 My Firebase object
我是这样来的:
客户服务
getClientsOfThisBranch(branchNumber:string){
return this.db.list('/clients/' + branchNumber).snapshotChanges();
}
一些组件
clientInfo$: any[] = [];
this.clientService.getClientsOfThisBranch('17').subscribe(data => {
data.forEach(x => { console.log( x.payload.val() ); this.clientInfo$.push(x.payload.val())})
});
任何帮助将不胜感激。 谢谢。
【问题讨论】:
标签: angular typescript firebase