Skip to content

Commit

Permalink
fix(core): Allow name + config deps to be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdaniels committed May 13, 2018
1 parent 7d2fd53 commit e6c25d0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/core/firebase.app.module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { InjectionToken, NgZone, NgModule } from '@angular/core';
import { InjectionToken, NgZone, NgModule, Optional } from '@angular/core';

import { FirebaseOptionsToken, FirebaseAppNameToken, FirebaseAppConfigToken } from './angularfire2';

import firebase from '@firebase/app';
import { firebase } from '@firebase/app';
import { FirebaseApp as _FirebaseApp, FirebaseOptions, FirebaseAppConfig } from '@firebase/app-types';
import { FirebaseAuth } from '@firebase/auth-types';
import { FirebaseDatabase } from '@firebase/database-types';
Expand Down Expand Up @@ -35,7 +35,11 @@ export function _firebaseAppFactory(options: FirebaseOptions, name?: string, app
const FirebaseAppProvider = {
provide: FirebaseApp,
useFactory: _firebaseAppFactory,
deps: [ FirebaseOptionsToken, FirebaseAppNameToken, FirebaseAppConfigToken ]
deps: [
FirebaseOptionsToken,
[new Optional(), FirebaseAppNameToken],
[new Optional(), FirebaseAppConfigToken]
]
};

@NgModule({
Expand Down

0 comments on commit e6c25d0

Please sign in to comment.