From dd062eff2cbfe7a40ceff99ad52d1eda1ba14200 Mon Sep 17 00:00:00 2001 From: James Daniels Date: Tue, 14 May 2024 11:36:28 -0400 Subject: [PATCH] No longer need importProvidersFrom --- site/src/get-started/quick-start.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/site/src/get-started/quick-start.md b/site/src/get-started/quick-start.md index 0258bf28a..9fd8a19a6 100644 --- a/site/src/get-started/quick-start.md +++ b/site/src/get-started/quick-start.md @@ -73,7 +73,6 @@ Beginning in [Angular v14](https://blog.angular.io/angular-v14-is-now-available- The provider configuration for these applications should be added to the `bootstrapApplication` function in `main.ts`: ```ts -import { importProvidersFrom } from '@angular/core'; import { initializeApp, provideFirebaseApp } from '@angular/fire/app'; import { getAuth, provideAuth } from '@angular/fire/auth'; import { bootstrapApplication } from '@angular/platform-browser'; @@ -83,15 +82,11 @@ import { environment } from './environments/environment'; bootstrapApplication(AppComponent, { providers: [ - importProvidersFrom( - provideFirebaseApp(()=> initializeApp(environment.firebase)) - ), + provideFirebaseApp(()=> initializeApp(environment.firebase)) ], }).catch(err => console.error(err)); ``` -Note that you are required to wrap the `provideFirebaseApp` function call in the `importProvidersFrom` function. - ### Configuring Firebase features 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 {} ```ts // Standalone API based config (main.ts) -import { importProvidersFrom } from '@angular/core'; import { initializeApp, provideFirebaseApp } from '@angular/fire/app'; import { provideFirestore, getFirestore } from '@angular/fire/firestore' import { getAuth, provideAuth } from '@angular/fire/auth'; @@ -137,11 +131,9 @@ import { environment } from './environments/environment'; bootstrapApplication(AppComponent, { providers: [ - importProvidersFrom( - provideFirebaseApp(() => initializeApp(environment.firebase)), - provideAuth(() => getAuth()), - provideFirestore(() => getFirestore()) - ), + provideFirebaseApp(() => initializeApp(environment.firebase)), + provideAuth(() => getAuth()), + provideFirestore(() => getFirestore()) ], }).catch(err => console.error(err)); ```