I am trying to query an ordered list in ionic3 and Angularfire2.
By this query it show me the restaurants from lowest to highest rating but how can I query from high to low?
the query:
this.restaurantsRef = afDb.list('/restaurants', ref => ref.orderByChild('rating'));
And how can I do a multiple query? As the user wants to filter the restaurants on multiple conditions.
AngularFire version:
"angularfire2": "^5.0.0-rc.6",
The documentation says this:
// Order descending by numbers or strings
afs.collection('people', ref => ref.orderBy('age', 'desc') )
afs.collection('people', ref => ref.orderBy('name', 'desc') ) // reverse alphabetical
But when I try orderBy
it returns me this error:
ref.orderBy is not a function
OrderBy seems not to exist on type Reference
Could someone help me out?