$ 0 0 Cannot set property 'currentBill' of null Also, I am not so sure about "function" and snapshot in your code