1
1
import { BrowserModule , BrowserTransferStateModule } from '@angular/platform-browser' ;
2
- import { NgModule , isDevMode } from '@angular/core' ;
2
+ import { isDevMode , NgModule } from '@angular/core' ;
3
3
4
4
import { AppRoutingModule } from './app-routing.module' ;
5
5
import { AppComponent } from './app.component' ;
@@ -9,7 +9,12 @@ import { environment } from '../environments/environment';
9
9
import { AngularFireModule } from '@angular/fire' ;
10
10
import { AngularFireStorageModule } from '@angular/fire/storage' ;
11
11
12
- import { AngularFireAnalyticsModule , UserTrackingService , ScreenTrackingService , DEBUG_MODE as ANALYTICS_DEBUG_MODE } from '@angular/fire/analytics' ;
12
+ import {
13
+ AngularFireAnalyticsModule ,
14
+ DEBUG_MODE as ANALYTICS_DEBUG_MODE ,
15
+ ScreenTrackingService ,
16
+ UserTrackingService
17
+ } from '@angular/fire/analytics' ;
13
18
14
19
import { FirestoreComponent } from './firestore/firestore.component' ;
15
20
@@ -28,7 +33,7 @@ import { RemoteConfigComponent } from './remote-config/remote-config.component';
28
33
const shouldUseEmulator = ( ) => false ;
29
34
30
35
@NgModule ( {
31
- declarations : [ AppComponent , StorageComponent , FirestoreComponent , DatabaseComponent , RemoteConfigComponent ] ,
36
+ declarations : [ AppComponent , StorageComponent , FirestoreComponent , DatabaseComponent , RemoteConfigComponent ] ,
32
37
imports : [
33
38
BrowserModule . withServerTransition ( { appId : 'serverApp' } ) ,
34
39
BrowserTransferStateModule ,
@@ -50,12 +55,19 @@ const shouldUseEmulator = () => false;
50
55
UserTrackingService ,
51
56
ScreenTrackingService ,
52
57
PerformanceMonitoringService ,
53
- { provide : ANALYTICS_DEBUG_MODE , useFactory : ( ) => isDevMode ( ) } ,
54
- { provide : DATABASE_URL , useFactory : ( ) => shouldUseEmulator ( ) ? `http://localhost:9000?ns=${ environment . firebase . projectId } ` : undefined } ,
55
- { provide : FIRESTORE_SETTINGS , useFactory : ( ) => shouldUseEmulator ( ) ? { host : 'localhost:8080' , ssl : false } : { } } ,
56
- { provide : FUNCTIONS_ORIGIN , useFactory : ( ) => shouldUseEmulator ( ) ? 'http://localhost:9999' : undefined } ,
58
+ {
59
+ provide : ANALYTICS_DEBUG_MODE ,
60
+ useFactory : ( ) => isDevMode ( )
61
+ } ,
62
+ {
63
+ provide : DATABASE_URL ,
64
+ useFactory : ( ) => shouldUseEmulator ( ) ? `http://localhost:9000?ns=${ environment . firebase . projectId } ` : undefined
65
+ } ,
66
+ { provide : FIRESTORE_SETTINGS , useFactory : ( ) => shouldUseEmulator ( ) ? { host : 'localhost:8080' , ssl : false } : { } } ,
67
+ { provide : FUNCTIONS_ORIGIN , useFactory : ( ) => shouldUseEmulator ( ) ? 'http://localhost:9999' : undefined } ,
57
68
{ provide : REMOTE_CONFIG_SETTINGS , useFactory : ( ) => isDevMode ( ) ? { minimumFetchIntervalMillis : 10_000 } : { } }
58
69
] ,
59
- bootstrap : [ AppComponent ]
70
+ bootstrap : [ AppComponent ]
60
71
} )
61
- export class AppModule { }
72
+ export class AppModule {
73
+ }
0 commit comments