I'm using Angular 5 and angularfire2 to work with Firebase. I have an array of strings which represent paths into firebase. What I'm currently doing is this:
const pathList: string[] = ['path1', 'path2', 'path3'];
const observableList = [];
pathList.map((location: string[]) => {
observableList.push(this.db.object(`path_to_something/${location}).valueChanges());
});
const combined = zip(observableList);
combined.subscribe((values: any[]) => {
console.log('DATA FROM ZIP', values);
}, err => {
console.log('DATA FROM ZIP ERROR', err);
});
That's what I've been trying but, the Observables doesn't seem to trigger. Any result on the console is displayed. Any idea on how this could work.
I tried with forkJoin and nothing as well. But I tried with combineList and it works. The issue with that is, I have to use zip