mardi 26 septembre 2017

why is remove() not working

I have search solutions but still I cant delete the data in my database. This is my code.

  if (e.target.classList.contains('delete')) {
  idd.value =  feedbackNode.querySelector('.feedback_id').innerText;
  vfeedbacksref.orderByKey().once("value").then(function(snapshot) {
     snapshot.forEach(function(childSnapshot) {
      childSnapshot.forEach(function(data) {  

    if(idd.value == data.key){
      console.log(data.key);[![enter image description here][1]][1]
    vfeedbacksref.child(data.key).remove();

  }
}




Aucun commentaire:

Enregistrer un commentaire