I am currently developing an app using both Ionic and Firebase as the backend. I have implemented code to watch for two separate events using child added and child changed, but I am running into an issue where it is firing multiple times. When checking the Firebase data, I only see one child added instead of the expected two. Here are snippets of the problematic code:
1.
new Firebase("https://unique-firestore-8563.firebaseio.com/btr/users/acceptedBySender/myid/").on("child_added",function(data,prevchild){
console.log('added just fired');
//this console log appears twice
});
2.
new Firebase("https://unique-firestore-8563.firebaseio.com/btr/users/posted/myid/").on("child_changed",function(data){
console.log('changed just fired');
//this console log appears eight times
});