I am currently working on an Angular 5 CRUD application, utilizing Google Firebase services. I have been following a helpful video tutorial on YouTube (link here), but I encountered this error
ngOnInit() {
var x = this.employeeService.getData();
x.snapshotChanges().subscribe(item => {
this.employeeList = [];
item.forEach(element => {
var y = element.payload.toJSON();
y["$key"] = element.key;
this.employeeList.push(y as Employee);
});
});
}
I need some help in fixing this issue.