@ngx-firebase/client
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

NgxFirebaseClient

The Firebase Client provides a configurable instance of the official Firebase SDK to Angular.

We built this because we prefer to use core SDKs for Firebase over more opinionated packages.

  • All of the Firebase documentation is valid
  • The API is much closer to the NodeJS admin API, making full stack development easier
  • The skills you gain developing are relevant on any platform

Installation

First install the firebase SDK and NgxFirebaseClient modules:

npm i firebase @ngx-firebase/client

Then import the module in your root app module:

// src/app/app.module.ts
...
import {NgxFirebaseClientModule} from '@ngx-firebase/client';
...
imports: [
  BrowserModule,
  NgxFirebaseClientModule.forRoot({
    apiKey: "#####",
    authDomain: "#####",
    databaseURL: "#####",
    projectId: "#####",
    storageBucket: "#####",
    messagingSenderId: "#####",
    appId: "#####",
    measurementId: "#####",
  })
],
...

Now you are ready to use the SDK in your components

// src/app/app.component.ts
import {NgxFirebaseClientService} from '@ngx-firebase/client';
...
export class AppComponent {
  constructor(private firebase: NgxFirebaseClientService) {
    // do something with the SDK
  }
}

Package Sidebar

Install

npm i @ngx-firebase/client

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

89.1 kB

Total Files

23

Last publish

Collaborators

  • forrestlyman