I've been using firebase for the first time, and I have a problem. I want to query the database 1x but on my console it appears that it has been queried several times.
var contador1 = firebase.database() .ref();
contador1.set({
Contador: {
number:1
}
});
var contando = firebase.database() .ref();
contando.orderByChild("number") .on("child_added", function(data) {
console.log(data.val() .number);
});
I'm using this code!
In case I wanted to put there variable 1, then it would query in the bank read the variable and add +1
Basically make a counter that works with the database!