-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
19 lines (17 loc) · 869 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
angular.module('rc', ['firebase'])
.controller('DataController', ['$scope', '$firebaseObject', '$firebaseArray', function($scope, $firebaseObject, $firebaseArray) {
$scope.message = "Hello World";
// Initialize Firebase
var config = {
apiKey: "AIzaSyD2bDGddfvtBx1IPC2HGmQttksiBzoM1-o",
authDomain: "rclogdata.firebaseapp.com",
databaseURL: "https://rclogdata.firebaseio.com",
storageBucket: "rclogdata.appspot.com",
messagingSenderId: "411289675891"
};
firebase.initializeApp(config);
var ref = firebase.database().ref();
var boogObj = $firebaseObject(ref.child('booger'));
boogObj.$bindTo($scope, "booger");
$scope.helicopters = $firebaseArray(ref.child('helicopters'));
}]);