Skip to content
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

Merged
merged 1 commit into from
May 12, 2018

Conversation

jamesdaniels
Copy link
Member

Checklist

  • Issue number for this PR: #nnn (required)
  • Docs included?: (yes/no; required for all API/functional changes)
  • Test units included?: (yes/no; required)
  • In a clean directory, yarn install, yarn test run successfully? (yes/no; required)

Description

Code sample

Copy link
Member

@davideast davideast left a 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
Copy link
Member

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 },
Copy link
Member

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 }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Use normal spacing

@davideast davideast merged commit 57906bd into master May 12, 2018
@jamesdaniels jamesdaniels deleted the firebase_app_config branch May 13, 2018 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants