Firebase RxJS observables for Angular
OTHER License
firebase-thermite-ng
contains the Angular modules for firebase-thermite
- a library of RxJS observables for Firebase.
You might need it if the official Angular library for Firebase - AngularFire2 - does not suit your requirements.
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.
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
.