Firebase offers a firsthand journey to a real time application that could be develop almost instantly. Firebase beautifully abstract away backend services. Thus, we now could create an application entirely with client side code, a venture that seemed impossible just a few years ago.

For those who share AngularJS love and passion, they will find a real treat in a library created just to enjoy this feature. This library is AngularFire.

A great journey start with picking the greatest path. All the developers that love Visual Studio as their main IDE have the opportunity to deep into the API of AngularFire by installing the angularfire strongly type library – angularfire.TypeScript.



Reference the API by adding the definition files

/// <reference path="../typings/angularjs/angular.d.ts" />
/// <reference path="../typings/angularfire/angularfire.d.ts" />
/// <reference path="../typings/firebase/firebase.d.ts" />
/// <reference path="gravatar.ts" />

In order to access a Firebase database, there are two key steps the first one is to instantiate the database, and the second one is to instantiate the array of items in a given table.

var ref = new Firebase(FURL);
 var tasks = $firebase(this.ref.child(this.table)).$asArray();