snapshot isn’t wrapped in your original code, and using once instead of on might help out. Not giving everything extremely similar names would totally help too…it’s like a mineField!!
it’s working very well on my screen. Add a ) at the end if you try it. I forgot it in my example. You should also be able to access ‘this’, which you can’t do with your previous function. That’s probably why this.currentBill was returning null.currentBill.
If not, make a reference to this.currentBill, like…let curBill = this.currentBill; and try using curBill instead. I literally went through this process for hours overnight. Same exact problems
I guess, in my view, I see a ton of functions returning functions and references in order to get this.currentBill = firebase.database().ref('Bills');
when you could just write this.currentBill = angFire.list('Bills');
or make a seperate this.items to hold 'Bills’ this.items = angFire.list('Bills');
then work from there
My last suggestion is trying to start from the ground up.
let myConnection = firebase.database().ref('/');
myConnection.orderByKey().on("child_added", function(snapshot) {
console.log("Got");
console.log(snapshot.val());
});```
and see what pops up.
and don't use 'any'. It helps very, very much.