Firebase Integration Ionic 2 – Introduction

Firebase Integration Ionic 2 – Introduction

Ionic & Firebase Tutorial:

This firebase integration with Ionic 2 contains following steps to do

Working with Ionic Project

Create New Project

ionic start --v2 Firebase blank

Add Required platform

ionic platform add android
ionic platform add ios

Working around dependencies files

Install firebase

npm install @ionic/app-[email protected] --save-dev
npm install firebase --save

Open /src/app/app.components.ts & import firebase

import firebase from 'firebase';

Initiate firebase inside constructor()

const config = {
 apiKey: "YOUR_API_KEY",
 authDomain: "YOUR_AUTH_DOMAIN",
 databaseURL: "YOUR_DB_URL",
 storageBucket: "YOUR_STORAGE_BUCKET"
};
firebase.initializeApp(config);