fireship-io / fireship.io

Build and ship your app faster https://fireship.io
3.49k stars 1.3k forks source link

snippets/install-angularfire/ #742

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Install @angular/fire

How to install @angular/fire, aka AngularFire2

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

FernandoArteaga commented 2 years ago

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

tommywong-dev commented 1 year ago

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';
viapek commented 1 year ago

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

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

Maybe remove the link?