krv
krv

Reputation: 2920

Having firebase and AngularFire2 in the same app

I have found myself using firebase as well as AngularFire2 in the same app.

The question I have is do I need to initialize both of them individually?

I am configurin my angularfire instance as follows

    AngularFireModule.initializeApp(firebaseConfig),

and for the firebase one i do the following

firebase.initializeApp(firebaseConfig)

Will any one do or both need to be initialized?

Upvotes: 0

Views: 74

Answers (1)

Hareesh
Hareesh

Reputation: 6900

You only need to configure like this

 AngularFireModule.initializeApp(firebaseConfig)

which will initialize firebase.

Angularfire2 not come with all features of firebase, so if you want to use firebase's native methods, just import this your component.ts

import * as firebase from 'firebase/app';

Upvotes: 2

Related Questions