firebase.database.ref is not a function error

后端 未结 3 1792
遇见更好的自我
遇见更好的自我 2020-12-10 16:46

I am trying to read/write data from my database, but I always get this error:

firebase.database.ref is not a function error

Here

3条回答
  •  攒了一身酷
    2020-12-10 17:04

    database() is a method so change it to the following:

     var reference =  firebase.database().ref();
    

    Also better not to have same variable and method name.

提交回复
热议问题