I have an ionic project and use firestore services
Ionic:
Ionic CLI : 6.19.0 (C:\Users\Windows 10\AppData\Roaming\npm\node_modules@ionic\cli) Ionic Framework
: @ionic/angular 6.0.14 @angular-devkit/build-angular : 13.3.1
@angular-devkit/schematics : 13.3.1 @angular/cli
: 13.3.1 @ionic/angular-toolkit : 6.1.0Capacitor:
Capacitor CLI : 3.4.3 @capacitor/android : 3.4.3
@capacitor/core : 2.4.5 @capacitor/ios : not installedUtility:
cordova-res : 0.15.4 native-run : 1.5.0
System:
NodeJS : v16.14.2 (C:\Program Files\nodejs\node.exe) npm : 8.5.0 OS : Windows 10
Is there a way to get the list of ids of the documents that belong to a collection without generating a read operation?
example
constructor(
private afs: AngularFirestore,
) {
afs.collection<Pais>('products').ref.onSnapshot(
products => products.forEach(product => console.log(product.id))
);
}