Hello
storeList
ㄴ3232390293(thes is uid)
ㄴ point
ㄴ value1 : 500
ㄴ value2 : 1000
above is my firebase database.
when value1 is changed to 700,
I want to detect in ionic app that value 1 is changed !
//this.uid = 3232390293
var a=this.afDb.list<Item>("/storeList/"+this.uid+"/point").valueChanges()
a.subscribe((snap)=>{
snap.map(item => {
console.log(item);
});
})
this.firedata.child(this.uid).child("point").on('value', (snap)=> {
if(snap.val()!=null){
console.log(snap.val()+"value changed!"+snap.key);
for(var result in snap.val()){
console.log(snap.val()[result]);
}
}
});
but above code log is called whatever is changed under point node.
How can I detect only value that is changed?