@dagonmetric/ng-config-firebase-remote-config
Version:
Google Firebase Remote Config integration of @dagonMetric/ng-config for Angular applications.
33 lines • 1.03 kB
JavaScript
/**
* @fileoverview added by tsickle
* Generated from: src/firebase-app-factory.ts
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
*/
/**
* @license
* Copyright DagonMetric. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found under the LICENSE file in the root directory of this source tree.
*/
import firebase from 'firebase/app';
/**
* @param {?} options
* @param {?} zone
* @param {?=} appName
* @return {?}
*/
export function firebaseAppFactory(options, zone, appName) {
appName = appName || '[DEFAULT]';
/** @type {?} */
const existingApp = firebase.apps.filter((/**
* @param {?} app
* @return {?}
*/
(app) => app && app.name === appName))[0];
return existingApp || zone.runOutsideAngular((/**
* @return {?}
*/
() => firebase.initializeApp(options, appName)));
}
//# sourceMappingURL=firebase-app-factory.js.map