1
1
import { NgModule } from '@angular/core' ;
2
2
import { BrowserModule } from '@angular/platform-browser' ;
3
- import { provideFirebaseApp , initializeApp , getApp } from '@angular/fire/app' ;
3
+ import { provideFirebaseApp , initializeApp } from '@angular/fire/app' ;
4
4
import { provideAuth , getAuth , connectAuthEmulator } from '@angular/fire/auth' ;
5
5
import { getStorage , provideStorage , connectStorageEmulator } from '@angular/fire/storage' ;
6
6
import { getDatabase , provideDatabase , connectDatabaseEmulator } from '@angular/fire/database' ;
@@ -11,11 +11,28 @@ import { FunctionsModule } from '@angular/fire/functions';
11
11
import { AppRoutingModule } from './app-routing.module' ;
12
12
import { AppComponent } from './app.component' ;
13
13
import { environment } from '../environments/environment' ;
14
-
14
+ import { HomeComponent } from './home/home.component' ;
15
+ import { UpboatsComponent } from './upboats/upboats.component' ;
16
+ import { AuthComponent } from './auth/auth.component' ;
17
+ import { FirestoreComponent } from './firestore/firestore.component' ;
18
+ import { DatabaseComponent } from './database/database.component' ;
19
+ import { FunctionsComponent } from './functions/functions.component' ;
20
+ import { MessagingComponent } from './messaging/messaging.component' ;
21
+ import { RemoteConfigComponent } from './remote-config/remote-config.component' ;
22
+ import { StorageComponent } from './storage/storage.component' ;
15
23
16
24
@NgModule ( {
17
25
declarations : [
18
26
AppComponent ,
27
+ HomeComponent ,
28
+ UpboatsComponent ,
29
+ AuthComponent ,
30
+ FirestoreComponent ,
31
+ DatabaseComponent ,
32
+ FunctionsComponent ,
33
+ MessagingComponent ,
34
+ RemoteConfigComponent ,
35
+ StorageComponent ,
19
36
] ,
20
37
imports : [
21
38
BrowserModule . withServerTransition ( { appId : 'serverApp' } ) ,
@@ -45,16 +62,7 @@ import { environment } from '../environments/environment';
45
62
return database ;
46
63
} ) ,
47
64
provideStorage ( ( ) => {
48
- // While I've provided two instances this should be the default, since it
49
- // uses the default app
50
- const storage = getStorage ( getApp ( ) , 'another-bucket' ) ;
51
- if ( environment . useEmulators ) {
52
- connectStorageEmulator ( storage , 'localhost' , 9199 ) ;
53
- }
54
- return storage ;
55
- } ) ,
56
- provideStorage ( ( ) => {
57
- const storage = getStorage ( getApp ( 'second' ) ) ;
65
+ const storage = getStorage ( ) ;
58
66
if ( environment . useEmulators ) {
59
67
connectStorageEmulator ( storage , 'localhost' , 9199 ) ;
60
68
}
0 commit comments