2
var firebase = new Firebase("....");
firebaseRef.on('child_added', function(snapshot) {
     ...
}

This will receive all elements, is there a way to not receive all children when creating a new Firebase reference? Only get new?

Thanks in advance

Steven Yates
  • 2,400
  • 3
  • 30
  • 58

1 Answers1

0

Answering question: Source: Firebase child_added only get child added Pointed out by: @Bernherd Hoffman

var firebaseRef = new Firebase("...");

firebaseRef.endAt().limit(1).on('child_added', function(snapshot){
//Do your stuff
});

Note: you will get 1 previous record, you you can filter that out.

Community
  • 1
  • 1
Steven Yates
  • 2,400
  • 3
  • 30
  • 58