How to add an OrderBy or Where to a collectionData query #3047
-
Hi all, Still not clear how to do an "orderBy" or a "where" filter in the collection query strings. I'm setting up a service in my app like so: dbCountries: Observable<any[]>; Anyone having any luck? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I had the same issue and finally found the fix myself! You will have to create one or more constraints, which is a where() for example. Example in my code where I used 2 constraints to get orders from a specific date:
I hope this will help someone! |
Beta Was this translation helpful? Give feedback.
I had the same issue and finally found the fix myself!
You will have to create one or more constraints, which is a where() for example.
Then you use a query, in which you pass the collection you want to query and the queryConstraints
Example in my code where I used 2 constraints to get orders from a specific date:
I hope this will help som…