Skip to content
The official Angular library for Firebase.
TypeScript JavaScript Other
Branch: master
Clone or download

Latest commit

Latest commit 2de8501 Jun 3, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Merge branch 'master' into docs/deploy-getting-started Jun 3, 2020
sample chore(lint): Fix line breaks Apr 29, 2020
src Merge branch 'master' into fix-lint Jun 2, 2020
test chore(lint): Fix some lint errors Apr 28, 2020
tools chore(lint): Use EMPTY for rxjs Apr 28, 2020
.editorconfig fix(providers): make AoT compile friendly (#410) Aug 11, 2016
.firebaserc feat: Support Angular 9 and bump to version 6.0.0 (#2282) Jan 30, 2020
.gitignore feat: Support Angular 9 and bump to version 6.0.0 (#2282) Jan 30, 2020
.npmignore feat: Support Angular 9 and bump to version 6.0.0 (#2282) Jan 30, 2020
.nvmrc feat: Support Angular 9 and bump to version 6.0.0 (#2282) Jan 30, 2020
.travis.yml chore(lint): Run lint in travis Apr 29, 2020
CHANGELOG.md chore(): 6.0 CHANGELOG Apr 2, 2020
CONTRIBUTING.md chore(): Use stackblitz template in ISSUE_TEMPLATE.md Apr 29, 2020
ISSUE_TEMPLATE.md Merge branch 'master' into stackblitz Jun 2, 2020
LICENSE chore: add license, readme, package Jan 11, 2016
PULL_REQUEST_TEMPLATE.md chore(): Update PR template with yarn Jan 23, 2018
README.md chore(): Use stackblitz template in ISSUE_TEMPLATE.md Apr 29, 2020
angular.json feat(schematics): firebase function deployment for angular universal (#… Mar 27, 2020
cloudbuild.yaml chore: Release v6 rc.0 (#2302) Jan 30, 2020
firebase.json feat: Support Angular 9 and bump to version 6.0.0 (#2282) Jan 30, 2020
karma.conf.js feat: Support Angular 9 and bump to version 6.0.0 (#2282) Jan 30, 2020
package.json chore(lint): Add husky pre-submit hook to run lint Apr 29, 2020
tsconfig.base.json feat: Support Angular 9 and bump to version 6.0.0 (#2282) Jan 30, 2020
tsconfig.jasmine.json feat(schematics): firebase function deployment for angular universal (#… Mar 27, 2020
tsconfig.json feat: Support Angular 9 and bump to version 6.0.0 (#2282) Jan 30, 2020
tsconfig.spec.json feat: Support Angular 9 and bump to version 6.0.0 (#2282) Jan 30, 2020
tslint.json chore(lint): Fix line breaks Apr 29, 2020
typedoc.json feat: Support Angular 9 and bump to version 6.0.0 (#2282) Jan 30, 2020
yarn.lock AngularFire 6.0 🔥 (#2376) Apr 2, 2020

README.md

AngularFire

The official Angular library for Firebase.

ng add @angular/fire

What is AngularFire?

  • Observable based - Use the power of RxJS, Angular, and Firebase.
  • Realtime bindings - Synchronize data in realtime.
  • Authentication - Log users in with a variety of providers and monitor authentication state.
  • Offline Data - Store data offline automatically with AngularFirestore.
  • Server-side Render - Generate static HTML to boost perceived performance or create static sites.
  • ngrx friendly - Integrate with ngrx using AngularFire's action based APIs.
  • Manage binary data - Upload, download, and delete binary files like images, videos, and other blobs.
  • Call server code - Directly call serverless Cloud Functions with user context automatically passed.
  • Push notifications - Register and listen for push notifications
  • Modular - Include only what's needed. No AngularFire package is above 4kb with most under 2kb (gzipped).

Quickstart

Get your first application up and running by following our quickstart guide.

Example use:

import { Component } from '@angular/core';
import { AngularFirestore } from '@angular/fire/firestore';
import { Observable } from 'rxjs';

@Component({
  selector: 'app-root',
  template: `
  <ul>
    <li *ngFor="let item of items | async">
      {{ item.name }}
    </li>
  </ul>
  `
})
export class MyApp {
  items: Observable<any[]>;
  constructor(firestore: AngularFirestore) {
    this.items = firestore.collection('items').valueChanges();
  }
}

Resources

Contributing

Stackblitz Template - Remember to set your Firebase configuration in app/app.module.ts.

Upgrading to v6.0? Check out our guide.

Having troubles? Get help on the Firebase Mailing List (officially supported), the Firebase Community Slack (look for the #angularfire2 room), Gitter, or Stack Overflow.

Developer Guide

NEW: Monitor usage of your application in production

AngularFireAnalytics provides a convient method of interacting with Google Analytics in your Angular application. The provided ScreenTrackingService and UserTrackingService automatically log events when you're using the Angular Router or Firebase Authentication respectively. Learn more about Google Analytics.

Interacting with your database(s)

Firebase offers two cloud-based, client-accessible database solutions that support realtime data syncing. Learn about the differences between them in the Firebase Documentation.

Cloud Firestore

AngularFirestore allows you to work with Cloud Firestore, the new flagship database for mobile app development. It improves on the successes of Realtime Database with a new, more intuitive data model. Cloud Firestore also features richer, faster queries and scales better than Realtime Database.

Realtime Database

AngularFireDatabase allows you to work with the Realtime Database, Firebase's original database. It's an efficient, low-latency solution for mobile apps that require synced states across clients in realtime.

Authenticate users

Upload files

Receive push notifications

BETA: Change behavior and appearance of your application without deploying

Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your app without requiring users to download an app update. Learn more about Remote Config.

NEW: Monitor your application performance in production

Firebase Performance Monitoring is a service that helps you to gain insight into the performance characteristics of your iOS, Android, and web apps. Learn more about Performance Monitoring.

Directly call Cloud Functions

Deploying your application

Firebase Hosting is production-grade web content hosting for developers. With Hosting, you can quickly and easily deploy web apps and static content to a global content delivery network (CDN) with a single command.

Server-side rendering

Angular Universal is a technology that allows you to run your Angular application on a server. This allows you to generate your HTML in a process called server-side rendering (SSR). Angularfire is compatible with server-side rendering; allowing you to take advantage of the Search Engine Optimization, link previews, the performance gains granted by the technology, and more. Learn more about Angular Universal.

Ionic

You can’t perform that action at this time.