I am fascinated to configure the api_keys from firebase hosting, see (https://firebase.google.com/docs/hosting/reserved-urls?authuser=3)
Angular: ~8.2.9
Firebase: ^7.8.0
AngularFire: 5.4.2
Tring initialization with empty props
AngularFireModule.initializeApp()
AngularFireModule.initializeApp(environment.firebase)
I am also struggling on how to get this to work with angularfire.
So far i have been unable to use the given example
fetch('/__/firebase/init.json').then(async response => {
firebase.initializeApp(await response.json());
});
As i cannot get the async fetch to work well with the initialisation of my @NgModule imports or somehow initialize Firebase lazy.
Ohhh but also you can import JSON like another file in ES6.
interesting...
Well i did not manage to load the init.json from external before importing the module like shown in the setup guide. Any hints?
Today my google-fu is better! yruzyui solved it on stackoverflow.
I think this ticket can be closed. Maybe a pointer in the getting started guide would be helpful.
Thanks for reporting this, I'll keep this issue open as I'd rather not promote the practice at this time. I have a better solution in mind for an upcoming release.
We'll be using __init.json in a future release, closing this as we don't plan on loading the SDKs using this method.
Most helpful comment
Today my google-fu is better! yruzyui solved it on stackoverflow.
I think this ticket can be closed. Maybe a pointer in the getting started guide would be helpful.