Skip to content

Commit 1b92cb0

Browse files
authored
No longer need importProvidersFrom (#3522)
1 parent 4d322f9 commit 1b92cb0

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

site/src/get-started/quick-start.md

+4-12
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ Beginning in [Angular v14](https://blog.angular.io/angular-v14-is-now-available-
7373
The provider configuration for these applications should be added to the `bootstrapApplication` function in `main.ts`:
7474

7575
```ts
76-
import { importProvidersFrom } from '@angular/core';
7776
import { initializeApp, provideFirebaseApp } from '@angular/fire/app';
7877
import { getAuth, provideAuth } from '@angular/fire/auth';
7978
import { bootstrapApplication } from '@angular/platform-browser';
@@ -83,15 +82,11 @@ import { environment } from './environments/environment';
8382

8483
bootstrapApplication(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

9792
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 {}
126121

127122
```ts
128123
// Standalone API based config (main.ts)
129-
import { importProvidersFrom } from '@angular/core';
130124
import { initializeApp, provideFirebaseApp } from '@angular/fire/app';
131125
import { provideFirestore, getFirestore } from '@angular/fire/firestore'
132126
import { getAuth, provideAuth } from '@angular/fire/auth';
@@ -137,11 +131,9 @@ import { environment } from './environments/environment';
137131

138132
bootstrapApplication(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

Comments
 (0)