Reputation: 4391
I've performed a query to Firebase firestore and the data is being called perfectly. but I can't use any kind of ordering on this query.
here is my code:
this.dressCollection = db.collection<Dress>('dress').orderBy("date", Query.Direction.ASCENDING);
this.dress = this.dressCollection.snapshotChanges().pipe(
map(actions => {
return actions.map(a => {
const data = a.payload.doc.data();
const id = a.payload.doc.id;
return { id, ...data };
});
})
);
I get this 2 errors:
Property 'orderBy' does not exist on type 'AngularFirestoreCollection<Dress>'
and
Cannot find name 'Query'
Upvotes: 0
Views: 698