This jsfiddle was written as an example from the "Creating AngularFire Services" section in the angularfire docs.
As you can see, the controller is supposed to add a new project using:
.controller('CreateCtrl', function($scope, $location, $timeout, Projects) {
$scope.save = function() {
Projects.$add($scope.project, function() {
$timeout(function() { $location.path('/'); });
});
};
})
and if you try to do it, you'll also see that it doesn't work, and the dev console will also show the error "undefined is not a function" pointing to this line:
Projects.$add($scope.project, function() {
How can this be fixed? Essencially, what I'm asking is: How to add an element to a firebase element, using an AngularFire extended service?