@@ -10,9 +10,12 @@ import { AngularFireModule } from '@angular/fire';
1010
1111import {
1212 AngularFireAnalyticsModule ,
13+ APP_NAME ,
14+ APP_VERSION ,
1315 DEBUG_MODE as ANALYTICS_DEBUG_MODE ,
1416 ScreenTrackingService ,
15- UserTrackingService
17+ UserTrackingService ,
18+ COLLECTION_ENABLED
1619} from '@angular/fire/analytics' ;
1720
1821import { FirestoreComponent } from './firestore/firestore.component' ;
@@ -55,24 +58,20 @@ import { FunctionsComponent } from './functions/functions.component';
5558 AngularFireDatabaseModule ,
5659 AngularFirestoreModule . enablePersistence ( { synchronizeTabs : true } ) ,
5760 AngularFireAuthModule ,
61+ AngularFireAuthGuardModule ,
5862 AngularFireRemoteConfigModule ,
5963 AngularFireMessagingModule ,
60- // AngularFireAnalyticsModule, // TODO having trouble getting this to work in IE
64+ AngularFireAnalyticsModule ,
6165 AngularFireFunctionsModule ,
62- // AngularFirePerformanceModule, // TODO having trouble getting this to work in IE
66+ AngularFirePerformanceModule ,
6367 AngularFireAuthGuardModule
6468 ] ,
6569 providers : [
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- */
70+ UserTrackingService ,
71+ ScreenTrackingService ,
72+ PerformanceMonitoringService ,
73+ { provide : ANALYTICS_DEBUG_MODE , useValue : false } ,
74+ { provide : COLLECTION_ENABLED , useValue : true } ,
7675 { provide : USE_AUTH_EMULATOR , useValue : environment . useEmulators ? [ 'localhost' , 9099 ] : undefined } ,
7776 { provide : USE_DATABASE_EMULATOR , useValue : environment . useEmulators ? [ 'localhost' , 9000 ] : undefined } ,
7877 { provide : USE_FIRESTORE_EMULATOR , useValue : environment . useEmulators ? [ 'localhost' , 8080 ] : undefined } ,
@@ -84,6 +83,8 @@ import { FunctionsComponent } from './functions/functions.component';
8483 { provide : USE_DEVICE_LANGUAGE , useValue : true } ,
8584 { provide : VAPID_KEY , useValue : environment . vapidKey } ,
8685 { provide : SERVICE_WORKER , useFactory : ( ) => navigator ?. serviceWorker ?. getRegistration ( ) ?? undefined } ,
86+ { provide : APP_VERSION , useValue : '0.0.0' } ,
87+ { provide : APP_NAME , useValue : 'Angular' }
8788 ] ,
8889 bootstrap : [ AppComponent ]
8990} )
0 commit comments