【发布时间】:2019-10-10 21:19:30
【问题描述】:
我正在做 Angular 和 Firebase 的项目。我从 firebase 获得一个对象,我想在 html 中显示它,但我不知道如何从数组中的对象获取值。 如何从 firebase 遍历自动索引?
这是调用 Firebase:
getListTasks() {
return this.db.list('/Tasks').valueChanges();
}
这是我的组件:
this.taskService.getListTasks().subscribe(t => {
this.todoTasks = t;
});
这是我在数组中的对象: https://imgur.com/a/7rZJx8D
【问题讨论】:
-
嗨 @student_it -- 你能发布你的 Angular 代码和调用 Firebase 的代码吗?
-
当然可以。
标签: javascript angular firebase-realtime-database angularfire