skip to Main Content

Firebase – Query using firestore collectionGroup but cant get data from root collection

I want to fetch learners enrolled in a specific subject. the collectionGroup works dbFire4 = Firebase.firestore dbFire4.collectionGroup("ClassEnrolled") .whereEqualTo("classID", classID) .get() .addOnSuccessListener { for (doc in documents) { val empData = doc.toObject(LearnerModel::class.java) learnerList.add(empData) } val mAdapter = LearnerAdapter(learnerList) recViewLearnerList.adapter = mAdapter…

VIEW QUESTION

Property 'default' does not exist on type 'typeof firebase'

I see typeOf error on default keyword. Here are my imports: import { AngularFirestore } from '@angular/fire/compat/firestore'; import { map } from 'rxjs/operators'; import firebase from 'firebase/compat/app'; import 'firebase/compat/firestore'; export class PostsService { constructor(private afs: AngularFirestore) { } countViews(postId: any){…

VIEW QUESTION
Back To Top
Search