Ошибка:
[ts] Cannot invoke an expression whose type lacks a call signature. Type 'DatabaseSnapshot<any>' has no compatible call signatures.
(parameter) item: AngularFireAction<DatabaseSnapshot<any>>
Служба потребления файлов :
**Error is at ...Item.payLoad().val()**
constructor(private service: EmployeeService) { }
ngOnInit() {
this.service.getEmployees().subscribe(list => {
let array = list.map(item => {
return { $key: item.key, **...item.payload().val()** }
})
});
}
**Method-II**
getEmployees() {
this.employeeList = this.db.list('employees');
return this.employeeList.snapshotChanges();
}