ion2-firebase v1.1.1
Firebase Module
This is a firebase module for Ionic2. Supports Angular's ngc and Ahead-of-Time compiling out of the box.
Developing
Develop your module like any other Angular 2 module. Then, run npm run build
to build a local copy.
When you're ready to publish to npm, run npm run publishPackage
.
If you'd like to test this package, run npm install ion2-firebase
npm link
Currently, modules must be published to npm. npm link
packages will not install properly with our webpack confing (something on our list). If you can't push private code to npm, other options are a private npm repo/npm enterprise, or npm install
from a git repo.
Using your module in an Ionic 2 app
Update src/app.module.ts
:
import { FirebaseModule } from 'ion2-firebase';
@NgModule({
imports: [
FirebaseModule
Update src/app/app-config.ts
:
export const FIREBASE_CONFIG = {
apiKey: "",
authDomain: "",
databaseURL: "",
storageBucket: "",
messagingSenderId: ""
};
Update .gitignore
:
src/app/app-config.ts
Update src/app/app.component.ts
:
import { FIREBASE_CONFIG } from './app-config';
import { FirebaseService } from 'ion2-firebase';
export class MyApp {
constructor(
firebaseService: FirebaseService
) {
firebaseService.init(FIREBASE_CONFIG);
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago