Open vittorbraga opened 7 years ago
Looks like some of the functions mentioned in the readme, are not available in the window.FirebaseDatabasePlugin object. Should we have done something during installation that is missing from the readme?
You need to put that command under onDeviceReady() function
`
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
var firebaseThings = window.FirebaseDatabasePlugin.ref('things');
}
</script>``
I tried with this but i am getting this error like Uncaught TypeError: Cannot read property 'ref' of undefined
hi , @sanjay90chd i am facing same problem. have you got any solution for this? Please help me
I got the solution for this use following code to get values from firebase DB var ref = firebase.database().ref(); ref.on('value', function(snapshot) { // updateStarCount(postElement, snapshot.val()); console.log(snapshot.val()); });
Note: you can use child function for getting values firebase.database().ref().child('User').child('1');
follow these links https://github.com/firebase/angularfire/blob/master/docs/guide/introduction-to-angularfire.md https://firebase.google.com/docs/database/web/read-and-write
Nope!. i will try it
@niyoma which plugin you used?
im getting same error. Cannot read property 'ref' of undefined using cordova cli phonegap wrapp. android 6.4.0
Apologies all, but I can no longer maintain this project. I happy to work with any other any maintainer to hand it off.
After installing the plugin with "cordova plugin add cordova-plugin-firebase-realtime-database --save", I added classpath 'com.google.gms:google-services:3.0.0' in build.gradle and in the function ReceiveEvent I added var firebaseThings = window.FirebaseDatabasePlugin.ref('farmacias');
When I run cordova run browser I get the error Uncaught TypeError: Cannot read property 'ref' of undefined
How to solve this problem?