"Firebase" and "firebase".
However, I would clone the exact same code out into another folder, and it would give me this error:
It turns out that in the 2.x library there is no little f "firebase". Doh! So let it be known that the 2.X library was all about the capital F "Firebase", and in order to use the little f one you need to have the 3.X library installed!
Initializing Firebase in 2.X
angular .module('ngNjOrg') constant('FIREBASE_URL', 'https://derp.firebaseio.com/') })();
self.ref = new Firebase(FIREBASE_URL);
The Firebase Database
From the source code you can access any of these nodes as either an object or a list. Here's an example of how we might load a node as an object:
var firebaseUserObj = $firebaseObject(self.ref.child('/users/user2)) return firebaseUserObj.$loaded().then(function(data) { $log.log("got firebase obj data: " + data.email); $log.log("data like firstName: " + data.firstName); return data; }, function(error) { })
self.pulledEvents = $firebaseArray(ref.child('events'));
Firebase(FIREBASE_URL + 'users').child(registeredUser.uid).set
Authentication with Firebase 2.X
self.ref = new Firebase(FIREBASE_URL); self.auth = $firebaseAuth(self.ref);
return self.auth.$authWithPassword({ email: user.email, password: user.password }).then(function(registeredUser){ $log.log("logged in!"); })