我需要在'quentinhas'中搜索搜索参数为'diasDaSemana'的文档....
类似的东西:
buscarPorDiaDaSemana(diaDaSemana) {
if (diaDaSemana != "") {
this.quentinhaCollection = this.afs.collection('quentinhas', ref => {
console.log(diaDaSemana)
return ref.where('diasDaSemana', '==', diaDaSemana);
});
}
this.quentinhas = this.quentinhaCollection.snapshotChanges()
.map(actions => {
return actions.map(a => {
const data = a.payload.doc.data();
const id = a.payload.doc.id;
return { id, data };
});
});
return this.quentinhas
}
但是此代码无法在该列表中进行搜索。
下面的火店图片: