I have started with firebase , but have run into an annoying problem for a while. When ever I create a database
object with firebase.database()
, when I try to call the ref
method , there is no ref method available. I am using WEBSTORM IDE from JetBrains. So when i push the data , it won't go into the database. Here is my code .
firebase.initializeApp(config);
function loginclicked()
{
var database = firebase.database()
var ref = database.ref('Scores') ;
var data = {"Name" :"Natesh" , "Age" : 27} ;
ref.push(data) ;
}
Here is my data in the database :-
My project name is 'sit-notifier' , I have also set the database rules to accept all requests.
Aucun commentaire:
Enregistrer un commentaire