showing results for - "add child data in firebase using angularjs"
Erik
16 Oct 2020
1var data = {new: 'record'};
2var db = new Firebase('https://example.firebaseio.com/a/b');
3
4// probably simplest and what you want
5db.child('c').push(data);
6
7// also fine, if you think scope needs to be compiled 
8// (but it won't since you are using AngularFire objects which take care of this)
9$firebase(db.child('c')).$push(data);
10
11// if you already have a $firebase object
12$firebase(db).$ref().child('c').push(data);
13
14// or like this
15var parent = $firebase(db);
16$firebase( parent.$getRef().child('c') ).$push(data);
17