【发布时间】:2014-10-31 05:35:11
【问题描述】:
我有一些记录,比如
{
"posts" : {
"1" : {
"text" : "sometext",
"title" : "test"
}
},
"user_posts" : {
"-J_ZT9vZJ4CcXh3PuiwR" : "1"
}
}
如何使用记录“1”获得“user_posts”中的文档名称? 我需要删除这个。这就是我正在做的:
$firebase(ref.child('user_posts')).$remove($indexFor(post.$id));
//post.$id is a id os post on posts, by using ng-repeat...
但我无法移除。 console.log() 总是返回 -1。我觉得我做错了什么......
【问题讨论】:
标签: json angularjs firebase behavior angularfire