@@ -7,7 +7,6 @@ import { ServiceWorkerModule } from '@angular/service-worker';
7
7
import { environment } from '../environments/environment' ;
8
8
9
9
import { AngularFireModule } from '@angular/fire' ;
10
- import { AngularFireStorageModule } from '@angular/fire/storage' ;
11
10
12
11
import {
13
12
AngularFireAnalyticsModule ,
@@ -17,13 +16,13 @@ import {
17
16
} from '@angular/fire/analytics' ;
18
17
19
18
import { FirestoreComponent } from './firestore/firestore.component' ;
20
-
21
19
import { AngularFireDatabaseModule , URL as DATABASE_URL } from '@angular/fire/database' ;
22
- import { AngularFireAuthModule } from '@angular/fire/auth' ;
23
20
import { AngularFirestoreModule , SETTINGS as FIRESTORE_SETTINGS } from '@angular/fire/firestore' ;
21
+ import { AngularFireStorageModule } from '@angular/fire/storage' ;
22
+ import { AngularFireAuthModule } from '@angular/fire/auth' ;
24
23
import { AngularFireMessagingModule } from '@angular/fire/messaging' ;
25
24
import { AngularFireFunctionsModule , ORIGIN as FUNCTIONS_ORIGIN } from '@angular/fire/functions' ;
26
- import { AngularFireRemoteConfigModule , SETTINGS as REMOTE_CONFIG_SETTINGS } from '@angular/fire/remote-config' ;
25
+ import { AngularFireRemoteConfigModule , SETTINGS as REMOTE_CONFIG_SETTINGS , DEFAULTS as REMOTE_CONFIG_DEFAULTS } from '@angular/fire/remote-config' ;
27
26
import { AngularFirePerformanceModule , PerformanceMonitoringService } from '@angular/fire/performance' ;
28
27
import { AngularFireAuthGuardModule } from '@angular/fire/auth-guard' ;
29
28
import { DatabaseComponent } from './database/database.component' ;
@@ -53,31 +52,35 @@ const shouldUseEmulator = () => false;
53
52
ServiceWorkerModule . register ( 'ngsw-worker.js' , { enabled : environment . production } ) ,
54
53
AngularFireModule . initializeApp ( environment . firebase ) ,
55
54
AngularFireStorageModule ,
56
- AngularFireAnalyticsModule ,
57
- AngularFireAuthModule ,
58
55
AngularFireDatabaseModule ,
59
56
AngularFirestoreModule . enablePersistence ( { synchronizeTabs : true } ) ,
57
+ AngularFireAuthModule ,
58
+ AngularFireRemoteConfigModule ,
60
59
AngularFireMessagingModule ,
60
+ // AngularFireAnalyticsModule, // TODO having trouble getting this to work in IE
61
61
AngularFireFunctionsModule ,
62
- AngularFireRemoteConfigModule ,
63
- AngularFirePerformanceModule ,
62
+ // AngularFirePerformanceModule, // TODO having trouble getting this to work in IE
64
63
AngularFireAuthGuardModule
65
64
] ,
66
65
providers : [
67
- UserTrackingService ,
68
- ScreenTrackingService ,
69
- PerformanceMonitoringService ,
70
- {
71
- provide : ANALYTICS_DEBUG_MODE ,
72
- useFactory : ( ) => isDevMode ( )
73
- } ,
66
+ /*
67
+ TODO Analytics and Performance monitoring aren't working in IE, sort this out
68
+ UserTrackingService,
69
+ ScreenTrackingService,
70
+ PerformanceMonitoringService,
71
+ {
72
+ provide: ANALYTICS_DEBUG_MODE,
73
+ useFactory: () => isDevMode()
74
+ },
75
+ */
74
76
{
75
77
provide : DATABASE_URL ,
76
78
useFactory : ( ) => shouldUseEmulator ( ) ? `http://localhost:9000?ns=${ environment . firebase . projectId } ` : undefined
77
79
} ,
78
80
{ provide : FIRESTORE_SETTINGS , useFactory : ( ) => shouldUseEmulator ( ) ? { host : 'localhost:8080' , ssl : false } : { } } ,
79
81
{ provide : FUNCTIONS_ORIGIN , useFactory : ( ) => shouldUseEmulator ( ) ? 'http://localhost:9999' : undefined } ,
80
- { provide : REMOTE_CONFIG_SETTINGS , useFactory : ( ) => isDevMode ( ) ? { minimumFetchIntervalMillis : 10_000 } : { } }
82
+ { provide : REMOTE_CONFIG_SETTINGS , useFactory : ( ) => isDevMode ( ) ? { minimumFetchIntervalMillis : 10_000 } : { } } ,
83
+ { provide : REMOTE_CONFIG_DEFAULTS , useValue : { background_color : 'red' } } ,
81
84
] ,
82
85
bootstrap : [ AppComponent ]
83
86
} )
0 commit comments