fireship.io icon indicating copy to clipboard operation
fireship.io copied to clipboard

snippets/install-angularfire/

Open utterances-bot opened this issue 3 years ago • 2 comments

Install @angular/fire

How to install @angular/fire, aka AngularFire2

https://fireship.io/snippets/install-angularfire/

utterances-bot avatar Apr 22 '22 02:04 utterances-bot

Hi Jeff, I have heard you talking about securing the web app using App Check. But I haven’t found a way to implementing this using AngularFire. Please can you provide an example or do a 100 second video 😅.

I will thank you a lot

FernandoArteaga avatar Apr 22 '22 02:04 FernandoArteaga

As of version @angular/fire 7 onwards, they are importing the modules in this way

imports: [
    BrowserModule,
    provideFirebaseApp(() => initializeApp(environment.firebaseConfig)),
    provideFirestore(() => getFirestore()),
    provideStorage(() => getStorage()),
    provideAuth(() => getAuth()),
],

Though, you can still import modules like the example shown above, provided that you are importing the "compatibility" libraries like

import { AngularFireModule } from '@angular/fire/compat';
import { AngularFirestoreModule } from '@angular/fire/compat/firestore';
import { AngularFireStorageModule } from '@angular/fire/compat/storage';
import { AngularFireAuthModule } from '@angular/fire/compat/auth';

tommywong-dev avatar Aug 26 '22 14:08 tommywong-dev

https://fireship.io/snippets/install-angularfire/

This is linked off https://fireship.io/courses/angular/app-firebase-setup/ but 404s.

Maybe remove the link?

viapek avatar Jan 16 '23 19:01 viapek