Hi, killing myself with this one- by 'misstake' I run "npm install firebase angularfire2 --save" and now I'm getting error
Property 'id' does not exist on type 'QueryDocumentSnapshot'.
getEmployees(): Observable<Employee[]> { return this.firestore.collection('companies').doc(this.company.companyId).collection('employees').snapshotChanges().map(changes => { return changes.map(a => { const data = a.payload.doc.data() as Employee; data.employeeId = a.payload.doc.id; return data; }); }); }
what is wrong?:S
P.s tryed:
return this.firestore.collection('companies').doc(this.company.companyId).collection('employees').snapshotChanges().pipe( map(actions => actions.map(a => { const emp = a.payload.doc.data() as Employee; emp.employeeId = a.payload.doc.id; return emp; })) );
-no help