Edward Potter
Edward Potter

Reputation: 3820

Firebase not defined. Super fixable, but fix is not working. Hello World example

This bug is probably staring right at me. Super simple, include the firebase.js, and all should be ready to go. Trying to display records. Stuck on this not defined thing. Yet all my firebase.js code is there. Thanks for any tips.

<!DOCTYPE html>
<html>
<head>
<script src="https://www.gstatic.com/firebasejs/live/3.0/firebase.js"></script>

<script>
    var myFirebaseRef = new Firebase("https://test-project-19d2d.firebaseio.com");

    myFirebaseRef.set({
    title: "Hello World!",
    author: "Firebase",
        location: {
                city: "San Francisco",
                state: "California",
                zip: 94103
         }
    });
</script>
</head>

<body>
    Hello World
</body>
</html>

enter image description here

Upvotes: 0

Views: 75

Answers (1)

Ymmanuel
Ymmanuel

Reputation: 2533

You are using Firebase version 3.0 with the syntax of the legacy version...

  new Firebase(url) //not valid anymore

check this link https://firebase.google.com/docs/web/setup

here it is defined how firebase 3.0 is integrated with javascript

Upvotes: 1

Related Questions