Unable to import Firebase Firestore getCountFromServer in Angular “firebase”: “^9.8.3”,

huangapple go评论69阅读模式
英文:

Unable to import Firebase Firestore getCountFromServer in Angular "firebase": "^9.8.3",

问题

我正在尝试在Firestore中使用Firebase文档中的“使用聚合查询计算文档总数”基础上,获取子集合中文档的总计数,该文档位于Angular应用程序中。

我尝试从@angular/fire/firestorefirebase/firestore导入,但出现错误提示:“没有导出名为'getCountFromServer'的成员。您是不是想使用'getDocFromServer'?”。

Unable to import Firebase Firestore getCountFromServer in Angular “firebase”: “^9.8.3”,

英文:

Im trying to get the total count of documents in a subcollection within the Firestore using the "Count documents with aggregation queries" base of the Firebase documentation Count documents with aggregation queries in an Angular application.

I've tried importing from @angular/fire/firestore and firebse/firestore.

But prompt error: "has no exported member named 'getCountFromServer'. Did you mean 'getDocFromServer'?"

Unable to import Firebase Firestore getCountFromServer in Angular “firebase”: “^9.8.3”,

答案1

得分: 2

'getCountFromServer'是在Firebase版本9.11中引入的。

要获取所有功能,您必须安装9.11版本或安装最新版本。

英文:

'getCountFromServer' was introduced in the firebase version 9.11.

You have to install either 9.11 or install the latest to get all the features.

huangapple
  • 本文由 发表于 2023年2月10日 10:41:23
  • 转载请务必保留本文链接:https://go.coder-hub.com/75406437.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定