skip to Main Content

Firebase – Is there any way to avoid nested subscribe?

(https://i.stack.imgur.com/2zm2w.png) collectionData(queryRef).subscribe((data) => { for (const each of data) { this.getCourse(each.courseId) .pipe(take(1)) .subscribe((courseData) => { const course = courseData[0]; console.log(course); this.getLecturer(course.lecturerId).pipe(take(1)).subscribe((res: any)=>{ const lecturer = res[0]; course.lecturerName = lecturer.lecturerName; course.lecturerImageUrl = lecturer.lecturerImageUrl; }); recentVisit.push(course); }); } }); Hi I am…

VIEW QUESTION

Property 'type' does not exist on type 'unknown' – Mysql

I am receiving various errors like this after I do ionic build --prod --release src/app/pages/top-media/top-media.page.ts:18:16 18 templateUrl: './top-media.page.html', ~~~~~~~~~~~~~~~~~~~~~~~ Error occurs in the template of component TopMediaPage. Error: src/app/pages/top-media/top-media.page.html:106:36 - error TS2339: Property 'type' does not exist on type 'unknown'.…

VIEW QUESTION
Back To Top
Search