I am trying to query documents based on document IDs but I am unable to get the data using
this.afs.collection<books>('books' , ref => ref.where( ref.id , 'in' , ['4L9uf4w5fqFXlU0uLbEM','bpXgEOmYqGor8uhUz2uq','tJFYPJcLMYNS8qnaUtMv'])).snapshotChanges().pipe(
map(actions => {
return actions.map( a => {
const data = a.payload.doc.data();
return {...data};
});
})
);
afs is of type AngularFirestore
I don't know if above code is correct.
I tried the solution mentioned at : Query firestore database for document id by replacing ref.id with firebase.firestore.FieldPath.documentId() but I get an error :
'firebase' refers to a UMD global, but the current file is a module.
Help me in retrieving the data.