I am having trouble connecting my firebase db in an OnsenUI/monaca app. I have looked through other threads pertaining to this issue, and I have made sure my call is updated for firebase 3.x.x. However, each time I try to launch the app in development, I get the same firebase not defined error. I am new to all this, and any help would be much appreciated
index.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta http-equiv="Content-Security-Policy" content="default-src * data:; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
<script src="https://cdn.firebase.com/js/client/2.4.2/firebase.js"></script>
<script>
//creates reference to firebase
var ref = new Firebase('https://monaca-cli-trial.firebaseio.com/');
// Initialize Firebase
var config = {
apiKey: "whateverapinumber",
authDomain: "myapp.firebaseapp.com",
databaseURL: "https://myapp.firebaseio.com",
storageBucket: "",
};
firebase.initializeApp(config);
var rootRef = firebase.database().ref();
</script>
<script src="https://www.gstatic.com/firebasejs/3.3.0/firebase.js"></script>
<script src="components/loader.js"></script>
<script src="lib/onsenui/js/onsenui.min.js"></script>
<script src="lib/javascriptstuff.js"></script>
<link rel="stylesheet" href="components/loader.css">
<link rel="stylesheet" href="lib/onsenui/css/onsenui.css">
<link rel="stylesheet" href="lib/onsenui/css/onsen-css-components.css">
<link rel="stylesheet" href="css/style.css">
The error I get points to line 19, which is the firebase.initializeApp(config);