Hi Gerwin, thanks so much for the article. Is this at all related to this: https://stackoverflow.com/questions/46649651/angular-firestore-creating-an-observable-reference-to-a-document-with-the-ge
The issue here is that when using AF5 .snapshotChanges(), if I’m on a page that displays document data, and i hit my custom ‘delete document’ button, it correctly deletes the document and redirects back to a list. However, in the console it reads:
“core.es5.js:1020 ERROR Error: This document doesn’t exist. Check doc.exists to make sure the document exists before calling doc.data().”
At a guess, I think it’s an observable that realises the document is no longer there before routing back to a different view. However, I don’t want to use the ‘.get’ method because I want users to see live updates to the document.
I’m new to this, so any advice on how to best approach this would be great.
- View a document and see live changes
- Hit delete button
- Navigate back to a list view
- Not have the error in the console