firebase-thermite-ng
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

firebase-thermite-ng

NPM version Build status dependency status devDependency Status peerDependency Status Greenkeeper badge

What is it?

firebase-thermite-ng contains the Angular modules for firebase-thermite - a library of RxJS observables for Firebase.

Why might you need it?

You might need it if the official Angular library for Firebase - AngularFire2 - does not suit your requirements.

How does it differ from AngularFire2?

The differencees between firebase-thermite and AngularFire2 are listed here.

In addition to those, firebase-thermite-ng differs from AngularFire2 in that it ensures subscribers execute within the Angular zone. With AngularFire2, subscribers execute within the zone in which the observable was created.

Usage

import {
  ThermiteAuthModule,
  ThermiteDatabaseModule,
  ThermiteModule
} from "firebase-thermite-ng";
 
@NgModule({
  bootstrap: [
    AppComponent
  ],
  imports: [
    ...
    ThermiteModule.initializeApp({
      apiKey: "...",
      authDomain: "...",
      databaseURL: "...",
      messagingSenderId: "...",
      storageBucket: "..."
    }),
    ThermiteAuthModule,
    ThermiteDatabaseModule
  ]
})
class AppModule {}

With the modules imported, ThermiteAuth and ThermiteDatabase are then available for injection into components, etc.

ThermiteAuth implements firebase.auth.Auth and ThermiteDatabase implements firebase.database.Database and both include additional methods that create observables. See auth/auth.ts and database/database.ts in firebase-thermite.

Dependents (0)

Package Sidebar

Install

npm i firebase-thermite-ng

Weekly Downloads

0

Version

2.0.4

License

MIT

Last publish

Collaborators

  • cartant