I have a array in firebase created using the push() function.
I am trying to remove a specific value in that array.
var arr = $firebaseArray(ref.child('invoices').child('pending').child(coId));
arr.$loaded().then(function(){
var index = arr.$getRecord(invoiceId);
arr.$remove(index);
})
However, this is not working. I keep getting -1 for the var index. If there is an easier way to remove a value, with or without angularFire, I would be open to it.
Thanks!