The part it doesn\'t like is the get() method in ngOnInit(). Is says, \"[ts] Property \'get\' does not exist on type \'AngularFirestoreDocument<{}>\'.\"
Actually,
AngularFirestoreDocument<{}>
doesn't haveget
property, useAngularFirestoreDocument<{}>.ref
instead:
this.afs.collection("users")
.doc(this.id)
.ref
.get().then(function(doc) {
if (doc.exists) {
console.log("Document data:", doc.data());
} else {
console.log("No such document!");
}
}).catch(function(error) {
console.log("Error getting document:", error);
});