@@ -73,7 +73,6 @@ Beginning in [Angular v14](https://blog.angular.io/angular-v14-is-now-available-
73
73
The provider configuration for these applications should be added to the ` bootstrapApplication ` function in ` main.ts ` :
74
74
75
75
``` ts
76
- import { importProvidersFrom } from ' @angular/core' ;
77
76
import { initializeApp , provideFirebaseApp } from ' @angular/fire/app' ;
78
77
import { getAuth , provideAuth } from ' @angular/fire/auth' ;
79
78
import { bootstrapApplication } from ' @angular/platform-browser' ;
@@ -83,15 +82,11 @@ import { environment } from './environments/environment';
83
82
84
83
bootstrapApplication (AppComponent , {
85
84
providers: [
86
- importProvidersFrom (
87
- provideFirebaseApp (()=> initializeApp (environment .firebase ))
88
- ),
85
+ provideFirebaseApp (()=> initializeApp (environment .firebase ))
89
86
],
90
87
}).catch (err => console .error (err ));
91
88
```
92
89
93
- Note that you are required to wrap the ` provideFirebaseApp ` function call in the ` importProvidersFrom ` function.
94
-
95
90
### Configuring Firebase features
96
91
97
92
After adding the Firbase app providers, you also need to add providers for the each of Firebase features your application needs.
@@ -126,7 +121,6 @@ export class AppModule {}
126
121
127
122
``` ts
128
123
// Standalone API based config (main.ts)
129
- import { importProvidersFrom } from ' @angular/core' ;
130
124
import { initializeApp , provideFirebaseApp } from ' @angular/fire/app' ;
131
125
import { provideFirestore , getFirestore } from ' @angular/fire/firestore'
132
126
import { getAuth , provideAuth } from ' @angular/fire/auth' ;
@@ -137,11 +131,9 @@ import { environment } from './environments/environment';
137
131
138
132
bootstrapApplication (AppComponent , {
139
133
providers: [
140
- importProvidersFrom (
141
- provideFirebaseApp (() => initializeApp (environment .firebase )),
142
- provideAuth (() => getAuth ()),
143
- provideFirestore (() => getFirestore ())
144
- ),
134
+ provideFirebaseApp (() => initializeApp (environment .firebase )),
135
+ provideAuth (() => getAuth ()),
136
+ provideFirestore (() => getFirestore ())
145
137
],
146
138
}).catch (err => console .error (err ));
147
139
```
0 commit comments