Search code examples
angularfirebasefirebase-realtime-databaseangularfire

Is there a way in AngularFire firebase to get multipath data in one query


I want to get data snapshot or valueChanges() from these two paths diretory/0GZfwgQqXRcJ3o2G23vClsEbPay1/files and directory/BgHYpuDpE3c7tRYuG2d8k0xHr2E2/files. However these paths will be dynamic and can be more than one. I dont want to apply for loop and subscribe to each path. I want single collection array with all these snapshots. How to do this using AngularFire Library?

Database Structure here

enter image description here


Solution

  • You can`t. Firebase does not support multi path queries. You can use the help of rsjx to join two observables and wait for their result to return and then join them. see this article for more info Is There Such A Thing As "Multi-Path Push" in Firebase Real-Time Datasbase?