@@ -73,7 +73,6 @@ Beginning in [Angular v14](https://blog.angular.io/angular-v14-is-now-available-
7373The provider configuration for these applications should be added to the ` bootstrapApplication ` function in ` main.ts ` :
7474
7575``` ts
76- import { importProvidersFrom } from ' @angular/core' ;
7776import { initializeApp , provideFirebaseApp } from ' @angular/fire/app' ;
7877import { getAuth , provideAuth } from ' @angular/fire/auth' ;
7978import { bootstrapApplication } from ' @angular/platform-browser' ;
@@ -83,15 +82,11 @@ import { environment } from './environments/environment';
8382
8483bootstrapApplication (AppComponent , {
8584 providers: [
86- importProvidersFrom (
87- provideFirebaseApp (()=> initializeApp (environment .firebase ))
88- ),
85+ provideFirebaseApp (()=> initializeApp (environment .firebase ))
8986 ],
9087}).catch (err => console .error (err ));
9188```
9289
93- Note that you are required to wrap the ` provideFirebaseApp ` function call in the ` importProvidersFrom ` function.
94-
9590### Configuring Firebase features
9691
9792After 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 {}
126121
127122``` ts
128123// Standalone API based config (main.ts)
129- import { importProvidersFrom } from ' @angular/core' ;
130124import { initializeApp , provideFirebaseApp } from ' @angular/fire/app' ;
131125import { provideFirestore , getFirestore } from ' @angular/fire/firestore'
132126import { getAuth , provideAuth } from ' @angular/fire/auth' ;
@@ -137,11 +131,9 @@ import { environment } from './environments/environment';
137131
138132bootstrapApplication (AppComponent , {
139133 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 ())
145137 ],
146138}).catch (err => console .error (err ));
147139```
0 commit comments