Creating a Controller

Accessing AngularFire from any controller is as simple as defining the
$firebase service as a dependency. You can do this by adding $firebase
as an argument to the controller's constructor.
Binding a Model to Firebase

Now, binding an ng-model to a Firebase location is as simple as invoking
the $firebase service with the right Firebase reference.
Reading Data

AngularFire will automatically update the model as needed.
Once you've bound a Firebase URL to a model via $firebase, you can use
your model as you normally would in a regular Angular app. But now, your
model will also update whenever data changes in Firebase.
This code iterates over all the messages on the server using ng-repeat
and displays them in an unordered list. Copy it into your controller to
complete this step.
Writing Data

Now let's write some data to Firebase.
You've done a great job of displaying messages, but to make this a real
chat room, we'll also need to allow the user to add messages to the
list. We've already taken care of binding the ng-keydown directive from
a text input field to a function called addMessage. You just have to
implement the addMessage function by appending new messages using the
$add method.

Just like Angular creates a 2-way data binding between a model and the
DOM, AngularFire creates a 2-way data binding between a model and
Firebase; so when you add a new message using $add, it also gets stored
into Firebase.
todo

Added css reference.