Open
Description
Version info
Angular: 16
Firebase: 7
AngularFire: latest
Other (e.g. Ionic/Cordova, Node, browser, operating system): Node
export class CategoryComponent {
private fs: Firestore = inject(Firestore);
categories$: Observable<Category[]>;
constructor() {
// get a reference to the user-profile collection
const categoryCollection = collection(this.fs, 'categories');
// get documents (data) from the collection using collectionData
this.categories$ = collectionData(categoryCollection) as Observable<Category[]>;
console.log(categoryCollection);
}
}
The Chrome console returns> ERROR FirebaseError: Expected type 'Query', but it was: a custom wh object
What is happening?
Metadata
Metadata
Assignees
Labels
No labels