I am facing some problem when use angular 2 to query data from Firestore.
Could anyone please help me by checking it and tell me where I have done wrong ?
My
If you are using Firebase hosting you can add the following to your firestore.indexes.json file:
{
"collectionGroup": "temp",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "uid",
"order": "ASCENDING"
},
{
"fieldPath": "startedAt",
"order": "DESCENDING"
}
]
}
When you deploy Firebase it will automatically build these indexes.
You can alternatively deploy the indexes by themselves with this command:
firebase deploy --only firestore:indexes