【问题标题】:Fetching all collections in angular Firestore?获取角度 Firestore 中的所有集合?
【发布时间】:2019-05-16 07:46:38
【问题描述】:

我想在我的项目中获取所有集合名称。 是否可以从 Angular Firebase 项目中获取所有集合名称。

我看到了这个问题,它没有为 Angular Firestore 提供答案。 Fetching all collections in Firestore

所以这不是一个重复的问题。谢谢

【问题讨论】:

    标签: angular firebase google-cloud-firestore angularfire2


    【解决方案1】:

    正如您在问题 (Fetching all collections in Firestore) 中提到的 SO 问题/答案中所解释的,没有用于列出集合(顶级集合或子集合)的客户端 API(Android、iOS、Web)。

    因为,如果我没记错的话,使用 angular(和 angularfire2)您正在构建一个“客户端”应用程序(在后台使用 Web API),您将找不到任何 API。

    您可以在特定 Firestore 文档中维护一个集合列表,即,当您以编程方式创建集合时,您会更新此列表。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-23
      • 1970-01-01
      • 1970-01-01
      • 2018-04-03
      • 2020-08-08
      相关资源
      最近更新 更多