angularfire - Firebase: Delete a node -


need delete entry trainname

firebase db

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(); 

see documentation firebase delete function.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -