how to Initialize the config dynamically?
- Langage dominant
- TypeScript
- Étoiles
- 7.8k
- Forks
- 2.2k
- Merge moyen
- 22 h 28 min
- PR mergées (30 j)
- 6
Description
I'm looking for a simple way to `initializeApp` later inside of the `app.component.ts` NOT in my `app.config.ts`. I need to do this because of my current app implementation and requirements...
Currently, here's my `app.config.ts` file:
```ts
import { provideFirebaseApp, initializeApp } from '@angular/fire/app';
import { getAnalytics, provideAnalytics } from '@angular/fire/analytics';
export const appConfig: ApplicationConfig = {
providers: [
provideFirebaseApp(() =>
initializeApp({
apiKey: 'xxx',
authDomain: 'xxx.firebaseapp.com',
databaseURL: 'https://xxx.firebaseio.com',
projectId: 'xxx',
storageBucket: 'xxx',
messagingSenderId: '123',
appId: 'xxx',
measurementId: 'xxx',
}),
),
provideAnalytics(() => getAnalytics()),
...
],
...
})
```
Any help is so appreciated ❤️
### Version info
**Angular:** 17.3.3
**Firebase:** ^10.13.1
**AngularFire:** ^18.0.1
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par comparer la configuration actuelle de app.config.ts avec le point d’initialisation demandé dans app.component.ts, en vous concentrant sur provideFirebaseApp, initializeApp, provideAnalytics et getAnalytics. Déterminez si les points d’entrée existants prennent en charge une configuration différée et définissez un comportement reproductible d’Angular 17/Firebase 10 confirmant que la configuration est initialisée ultérieurement.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, firebase, typescript
- Domaine
- developer-experience, frontend
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100