AngularFire $remove item from Array using a variable in Firebase reference does not work

后端 未结 2 1054
慢半拍i
慢半拍i 2021-01-23 07:18

I\'ve been struggling with the following problem:

I\'m trying to delete a \'Post\' item from a Firebase Array with the $remove AngularFire method which I have implemente

2条回答
  •  北荒
    北荒 (楼主)
    2021-01-23 08:03

    The only way I'm able to remove the item is using a loop on the array we get from firebase.

    var ref= new Firebase('https://Yourapp.firebaseio.com/YourObjectName');
    var arr_ref=$firebaseArray(ref);
        for(var i=0;i

提交回复
热议问题