Skip to content

gallotamas/angularfire2

 
 

Repository files navigation

AngularFire2

The official library for Firebase and Angular 2

AngularFire2 is currently not on new Firebase 3.0 SDK, but there is an update in progress.

Build Status Join the chat at https://gitter.im/angular/angularfire2

Status: Beta

What is AngularFire2?

  • Observable based - Use the power of rxjs, Angular 2, and Firebase.
  • Realtime bindings - Synchronize collections as objects or lists.
  • Authentication - Monitor authentication state in realtime.

Install

npm install angularfire2 firebase --save

Example use:

import {Component} from '@angular/core';
import {AngularFire, FirebaseListObservable} from 'angularfire2';

@Component({
  selector: 'project-name-app',
  template: `
  <ul>
    <li *ngFor="let item of items | async">
      {{ item.name }}
    </li>
  </ul>
  `
})
export class MyApp {
  items: FirebaseListObservable<any[]>;
  constructor(af: AngularFire) {
    this.items = af.database.list('/items');
  }
}

Developer Guide

If you want to get started quickly on building with AngularFire2, check out our 5 step developer guide that will teach you everything you need to know to be dangerous with AngularFire2.

  1. Installation & Setup
  2. Retreiving data as objects - FirebaseObjectObservable
  3. Retreiving data as lists - FirebaseListObservable
  4. Querying lists
  5. User Authentication - FirebaseAuthentication

About

The official Angular 2 library for Firebase.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 93.4%
  • JavaScript 5.0%
  • HTML 1.6%