If you want to use an Object and have auto-generated keys, use the add
method on a angularFireCollection
. For example:
function ExampleController($scope, angularFireCollection) {
var url = 'https://angularFireExample.firebaseio-demo.com/';
$scope.examples = angularFireCollection(url);
$scope.addExample = function(ex) {
$scope.examples.add(ex);
};
}