我想列出 Ionic4 应用程序内的 Firestore 数据库集合,因此我使用 listCollection 部分中的文档,因此我在代码中应用了示例代码:
this.afs.firestore.listCollections().then(collections => {
for (let collection of collections) {
console.log(`Found collection with id: ${collection.id}`);
}
});
这是我的构造函数:
constructor(private router: Router,
private afs: AngularFirestore,
private fireauth: AngularFireAuth) { }
我收到此错误:错误 TS2339:“Firestore”类型上不存在属性“listCollections”。
我无法使用属性 listCollections,因为它位于在线文档中...
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号