Google Firebase seems to be difficult to wrap my head around... I have no problems in getting documents and their data out of a collection, but when I try to simply get a list of all the IDs inside a collection, I am not able to figure out what the call should look like. I have tried searching for the info, but without success.
I have a function declared in my service component, which looks like this:
getCollRegistrationNumbers(): firebase.firestore.CollectionReference {
return firebase.firestore().collection(`storedItems`);
}
Then in e.g. the Search page of my app, I am calling the function from my component, but whatever I try, it returns empty.
Given the service function above, how should I complete the code below to just git a list of the IDs?
this.fireStore.getCollRegistrationNumbers().get()
.then(snapshot => {....})
