angular - 将角度形式保存到 Firebase 时出现未定义的推送错误
问题描述
获取 TypeError:尝试保存我的 Angular 表单时,无法读取我的服务中未定义的属性“推送”。
这就是我试图在我的 article.service.ts 中实现它的方式
createArticle(data: ArticleDB) {
this.articles.push(data);
}
尝试了Stackoverflow 回复,但它说 Type 'undefined[]' is missing the following properties from type 'AngularFireList':query、valueChanges、snapshotChanges、stateChanges 和另外 4 个。 参考图像