I'm trying to read and show the data from my Firebase Database using many ways but could not get it work. I've the following structure in my firebase : Firebase database
And this is my code:
var usersRef = firebase.database().ref('users');
usersRef.on('value', function(snapshot) {
snapshot.forEach(function(childSnapshot) {
var childData = childSnapshot.val();
console.log(childData);
});
});
The console.log don't display anything.
Note: I already tried using "child_added" instead of "value" and it does not work.
Aucun commentaire:
Enregistrer un commentaire