From e50056a68c8bc8403a085534b62121c8353d2a45 Mon Sep 17 00:00:00 2001 From: James Daniels Date: Sun, 13 May 2018 14:44:04 -0700 Subject: [PATCH] fix(core): Allow name + config deps to be optional --- src/core/firebase.app.module.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/firebase.app.module.ts b/src/core/firebase.app.module.ts index 3a3e1afee..74d5d0b2f 100644 --- a/src/core/firebase.app.module.ts +++ b/src/core/firebase.app.module.ts @@ -1,4 +1,4 @@ -import { InjectionToken, NgZone, NgModule } from '@angular/core'; +import { InjectionToken, NgZone, NgModule, Optional } from '@angular/core'; import { FirebaseOptionsToken, FirebaseAppNameToken, FirebaseAppConfigToken } from './angularfire2'; @@ -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({