3
是否可以在Firbase的on('child_removed')
回调函数中检索删除的孩子的密钥?从child_removed firebase事件中获取项目的密钥
是否可以在Firbase的on('child_removed')
回调函数中检索删除的孩子的密钥?从child_removed firebase事件中获取项目的密钥
从Firebase documentation for on('value'
:
此事件将每一个孩子被删除时被触发。传入回调函数的DataSnapshot将是被删除的子项的旧数据。
firebaseRef.on('child_removed', function(oldChildSnapshot) {
console.log('Child '+oldChildSnapshot.key()+' was removed');
});
相反描述的代码,包括最小的代码显示的问题你的问题。 –
@FrankvanPuffelen更新,感谢您的反馈 –