Hello,
i use this example for testing my app join
#####################################################
var fb = firebase.database().ref();
var norm = new firebase.util.NormalizedRecord(
fb.child('images'),
[fb.child('users'), 'users', 'images.owner']
);
var ref = norm.select('images.$key', 'images.owner', 'users.nickname', 'images.url').ref;
ref.on('value', function(snap) {
console.log('Data: '+snap.val());
});
#####################################################
but i receive this error
Error: firebase.util.NormalizedRecord is not a constructor
why??
my firebase array as similar to example doc:
#########################################
{
"images": {
"-K34gfr2k4987234": {
"owner": "03gh4r5dkg94ntjg",
"url": "https://www................"
}
},
"users": {
"03gh4r5dkg94ntjg": {
"nickname": "Al"
}
}
}
#########################################
i'm aspected this result
#########################################
{
"images": {
"-K34gfr2k4987234": {
"owner": "03gh4r5dkg94ntjg",
"nickname": "Al",
"url": "https://www................"
}
}
}
#########################################
thanks for help me
Alex
Hello,
i use this example for testing my app join
#####################################################
var fb = firebase.database().ref();
var norm = new firebase.util.NormalizedRecord(
fb.child('images'),
[fb.child('users'), 'users', 'images.owner']
);
var ref = norm.select('images.$key', 'images.owner', 'users.nickname', 'images.url').ref;
ref.on('value', function(snap) {
console.log('Data: '+snap.val());
});
#####################################################
but i receive this error
Error: firebase.util.NormalizedRecord is not a constructor
why??
my firebase array as similar to example doc:
#########################################
{
"images": {
"-K34gfr2k4987234": {
"owner": "03gh4r5dkg94ntjg",
"url": "https://www................"
}
},
"users": {
"03gh4r5dkg94ntjg": {
"nickname": "Al"
}
}
}
#########################################
i'm aspected this result
#########################################
{
"images": {
"-K34gfr2k4987234": {
"owner": "03gh4r5dkg94ntjg",
"nickname": "Al",
"url": "https://www................"
}
}
}
#########################################
thanks for help me
Alex