1
A
回答
1
希望你可以试试这个:
使用Cloud Firestore SDK
。
let docRef = db.collection("following").doc("your-id");
docRef.get().then((doc)=> {
if (doc.exists) {
console.log("Document data:", doc.data());
let myData=doc.data();
let isTrue= myData.boolean-property-name;//return true or false
} else {
console.log("No such document!");
}
}).catch(function(error) {
console.log("Error getting document:", error);
});
使用AngularFire2:Docs
注:
阅读这篇文章:Google Cloud Firestore integration with Ionic and AngularFire
your-id
- 你需要通过你的doc
这里
boolean-property-name
- 这只是一个虚拟的名字。你需要在这里传递你的实际属性名称。在你的情况下,它就像cug.....
相关问题
- 1. 云公司的FireStore
- 2. 如何在公司的FireStore
- 3. 公司的FireStore安全规则:文档
- 4. 限价澄清新公司的FireStore
- 5. 公司的FireStore如何使用的GeoPoint
- 6. 云公司的FireStore数据库结构
- 7. 在火力云公司的FireStore
- 8. 延迟加载公司的FireStore
- 9. 火力地堡公司的FireStore错误
- 10. 检索公司由多位
- 11. 从公司的FireStore斯威夫特4的iOS检索文档最近ID
- 12. 公司的FireStore排序依据(子集合)
- 13. 结构数据库公司的FireStore帖子
- 14. 云公司的FireStore字符串> =字符串
- 15. 在阵列删除指数公司的FireStore
- 16. 检索计算场的公式?
- 17. 公司的FireStore:从收集查询所有文档
- 18. 我如何通过最新的与公司的FireStore查询
- 19. 将在公司的FireStore和货物的做法
- 20. 云公司的FireStore最小的部署目标
- 21. 更改公司场打进子域网址的jQuery
- 22. Gradle公司的母公司
- 23. 云功能与公司的FireStore错误“已逾期”
- 24. AWS lambda来公司的FireStore错误:无法导入名称“cygrpc”
- 25. 管理网上存在于云计算公司的FireStore
- 26. 公司的FireStore规则时数据不存在
- 27. 如何获得'云功能shell`与公司的FireStore工作
- 28. 没有得到自定义文件中公司的FireStore
- 29. 如何建立云公司的FireStore静态托管网站
- 30. 文件中检查出来谁离开公司的雇员
你好,非常感谢你的答案...我试着用指示的代码,但它返回了3个错误,打印在链接:(https://drive.google。 com/open?id = 0B14jg18TLF3USC1xc292S3FYR0k) –
查看更新。 – Sampath
我现在所做的更改我只拿到1个错误: **打字稿错误 属性“GET”的类型不存在“AngularFirestoreDocument <{}>” ** –