fireship-io / fireship.io

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

courses/angular/user-feature-module/ #747

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Lazy Loaded Login Feature

Configure the router for lazy-loaded user module, aka code splitting.

https://fireship.io/courses/angular/app-shared-module/

itsmikeferrari commented 2 years ago

For others taking this course after AngularFire and Firebase have been updated. If you get an error like this: Module '"@angular/fire/auth"' has no exported member 'AngularFireAuthModule

then you need to change your import from this import { AngularFireModule } from '@angular/fire'; import { AngularFirestoreModule, provideFirestore,getFirestore } from '@angular/fire/firestore'; import { AngularFireAuthModule, provideAuth,getAuth } from '@angular/fire/auth';

to this import { AngularFireModule } from '@angular/fire/compat'; import { AngularFirestoreModule } from '@angular/fire/compat/firestore'; import { provideFirestore, getFirestore } from '@angular/fire/firestore'; import { AngularFireAuthModule } from '@angular/fire/compat/auth'; import { provideAuth, getAuth } from '@angular/fire/auth';

See how the /compat is used and AngularModule are separate from provide