Answers for "Module '"@angular/fire/firestore"' has no exported member 'AngularFirestoreDocument'"

0

Module '"@angular/fire/firestore"' has no exported member 'AngularFirestoreDocument'

//Angular changed the syntax, the new import should be:
import { Firestore,
       collectionData, collection} from '@angular/fire/firestore';

//You should also change the construction:
item$: Observable<Item[]>;
  constructor(firestore: Firestore) {
    const collection = collection(firestore, 'items');
    this.item$ = collectionData(collection);
}
//Check the GitHub repo in the source for more details
Posted by: Guest on January-18-2022

Code answers related to "Module '"@angular/fire/firestore"' has no exported member 'AngularFirestoreDocument'"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language