简体   繁体   English

使用Firestore在Angle 6中收集问题

[英]Problem collection in angular 6 using firestore

this.afDB.collection('places/' + place.id ).add(place);  

I have problem in collection ( ' places ' + place.id ) 我在收藏中遇到问题('place'+ place.id)

Place was added, but the collection came out place1537547932547 and I want it to come out in the folder place 已添加位置,但是集合出现在位置1537547932547,我希望它出现在文件夹中

Error in console : Collection references must have an odd number of segments 控制台错误:集合引用中的段数必须为奇数

解决问题

this.afDB.collection('places').doc('' + place.id ).set(place);  

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM