angularfire - Firebase: Delete a node -
need delete entry trainname
i tried below code didnt work me.
var usersref = new firebase('https://hosurcabapp.firebaseio.com').child('user');delee var clientinfo = $firebase(usersref); $scope.clientinfo = clientinfo.$asobject(); $scope.deleteclient = function(key) { clientinfo.$remove(key); };
kindly since new firebase
you can not set null
value in firebase, since firebase treats null
instruction delete node. quote docs:
passing
null
set()
remove data @ specified location.
since application uses null
signal specific condition, should substitute value signal condition:
ref.child('trainname').set('<unnamed>');
update
if want delete node, can do:
usersref.child(key).remove();
Comments
Post a Comment