Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 13 Firebase tutorial #1

Open
Slusks opened this issue Jan 1, 2022 · 0 comments
Open

Angular 13 Firebase tutorial #1

Slusks opened this issue Jan 1, 2022 · 0 comments

Comments

@Slusks
Copy link

Slusks commented Jan 1, 2022

Thank you for generating this excellent tutorial. I am having one issue getting started and I was curious if you knew why.

In tutorial-list.component I'm getting the following error in retrieveposts()

retrieveposts(): void {
this.PostService.getAll().snapshotChanges().pipe(
map(changes =>
changes.map(c =>
({ id: c.payload.doc.id, ...c.payload.doc.data() }) <-TS2339: Property 'id' does not exist on type 'QueryDocumentSnapshot'.
)
)
).subscribe(data => {
this.posts = data;
});
}

I was curious if this was because I dont currently have any posts in my firestore, or if there could be another issue in this file. Note I relabeled everything that has "tutorial" in it to "post".

Thank you again for such a great tutorial and Happy New Year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant