Dynamic loading of configuration to initialize firebase #3056
Unanswered
PhantomLinker
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I am having a similar situation, did you manage to find a solution to it ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For better CI/CD I am trying to load the firebase configuration from an external source before bootstrapping the app.module.ts. I tried many solutions which were suggested by others, e.g.: the solution suggested by @efraespada in #1095 or this guide by sakshi subedi but I couldn't get them to work on my end.
Also the APP_INITIALIZER does not work, as the providers don't block the execution of the imports.
Being able to use useFactory as suggested in #2451 might solve this issue by allowing something like this:
But with the initialisation of angularfire since V7 an approach like this would be even better:
So is there a way to load the firebase config via a http get before initialising the app? If not, would it be possible to include such a feature by also handling
() => Promise<FirebaseApp>
instead of only() => FirebaseApp
inprovideFirebaseApp
?Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions