mercredi 17 avril 2019

Is there any library which support emberjs-1.6 for integrate Firebase

I am trying to use Firebase services for my existing emberjs-1.6 application. For that is there any library exist or Is there any alternative method to use the javascript library for this integration?

I've tried to use javascript library to do this (https://www.gstatic.com/firebasejs/5.9.4/firebase.js)

    var config = {
        apiKey: "---",
        authDomain: "---",
        databaseURL: "---",
        projectId: "---",
        storageBucket: "---",
        messagingSenderId: "---"
    };

    firebase.initializeApp(config);
    db=firebase.firestore();

    db.settings({timestampsInSnapshots:true});

    db.collection('cafes').get().then((snapshot)=>{
        snapshot.docs.forEach(doc => {
            console.log(doc);
        });;
    })

I expected to display data in my Firestore on the web browser console. but it produces the following error message

"Uncaught FirebaseError: Invalid collection reference. Collection references must have an odd number of segments, but has 0 "




Aucun commentaire:

Enregistrer un commentaire