im在我的有角度的web应用程序中查询数据,如下所示:
this.notesCollection = this.afs.collection('BasicBlogs', ref =>{
return ref.where('title','==', blog)
});
this.notes = this.notesCollection.valueChanges()
这是我的笔记:
interface Note{
imageUrl: string;
title: string;
body: string;
titledesc: string;
imgalt: string;
imgdesc: string;
imgtitle: string;
authorId: string;
state: string;
}
现在的问题是我无法访问每个通过查询参数的文档的文档ID。因此,我尝试了以下操作,但没有成功:
this.notesCollection = this.afs.collection('BasicBlogs', ref =>{
return ref.where('title','==', blog)
});
this.notes = this.notesCollection.valueChanges()
this.id = this.notesCollection.valueChanges.id