-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support FirebaseAppConfig (added in Firebase 4.13) #1627
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only small nits, can be followed up in another PR.
}; | ||
|
||
@NgModule({ | ||
providers: [ FirebaseAppProvider ], | ||
}) | ||
export class AngularFireModule { | ||
static initializeApp(config: FirebaseOptions, appName?: string) { | ||
static initializeApp(options: FirebaseOptions, appNameOrConfig?: string | FirebaseAppConfig) { | ||
const name = typeof appNameOrConfig === 'string' && appNameOrConfig || undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Just use normal spacing instead of trying to align the operators.
return { | ||
ngModule: AngularFireModule, | ||
providers: [ | ||
{ provide: FirebaseAppConfig, useValue: config }, | ||
{ provide: FirebaseAppName, useValue: appName } | ||
{ provide: FirebaseOptionsToken, useValue: options }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Use normal spacing like mentioned above.
{ provide: RealtimeDatabaseURL, useValue: FIREBASE_DB_NAME } | ||
{ provide: FirebaseAppNameToken, useValue: FIREBASE_APP_NAME_TOO }, | ||
{ provide: FirebaseOptionsToken, useValue: COMMON_CONFIG }, | ||
{ provide: RealtimeDatabaseURL, useValue: FIREBASE_DB_NAME } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Use normal spacing
Checklist
yarn install
,yarn test
run successfully? (yes/no; required)Description
Code sample