chemerisuk / cordova-plugin-firebase-analytics

Cordova plugin for Firebase Analytics
MIT License
154 stars 305 forks source link

No "initializeApp()" method? #177

Closed henrylow97 closed 3 years ago

henrylow97 commented 3 years ago

From Firebase Admin Console, when creating web app, there's 2 options: image

If we choose to go with Config, lets say we want to store "firebaseConfig" in environment.ts file, can we do something like below?

constructor(private firebaseAnalytics: FirebaseAnalytics) {
  this.firebaseAnalytics.initializeApp(environment.firebaseConfig);
  this.firebaseAnalytics.analytics();
}

If not, I don't see how "firebaseAnalytics" will "know" about the "firebaseConfig".