Answers for "add child data in firebase using angularjs"

0

add child data in firebase using angularjs

var data = {new: 'record'};
var db = new Firebase('https://example.firebaseio.com/a/b');

// probably simplest and what you want
db.child('c').push(data);

// also fine, if you think scope needs to be compiled 
// (but it won't since you are using AngularFire objects which take care of this)
$firebase(db.child('c')).$push(data);

// if you already have a $firebase object
$firebase(db).$ref().child('c').push(data);

// or like this
var parent = $firebase(db);
$firebase( parent.$getRef().child('c') ).$push(data);
Posted by: Guest on July-15-2020

Code answers related to "add child data in firebase using angularjs"

Code answers related to "Javascript"

Browse Popular Code Answers by Language