-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
43 lines (35 loc) · 1.17 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<html ng-app="sampleApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.17/angular.min.js"></script>
<script src="https://cdn.firebase.com/js/client/1.0.18/firebase.js"></script>
<script src="https://cdn.firebase.com/js/simple-login/1.6.3/firebase-simple-login.js"></script>
<script src="https://cdn.firebase.com/libs/angularfire/0.8.0/angularfire.min.js"></script>
</head>
<body>
<h3>Firebase Data testing</h3>
<div ng-controller="msgCtrl">
<h3>Code School</h3>
<ol>
<li ng-repeat="d in data['codeCombat']">
{{d.name}}
</li>
</ol>
<hr>
<h3>Code Combat</h3>
<ol>
<li ng-repeat="d in data['codeSchool']">
{{d.name}}
</li>
</ol>
</div>
<hr>
<script>
var app = angular.module("sampleApp", ["firebase"]);
app.controller("msgCtrl", function($scope, $firebase) {
var ref = new Firebase("https://scorching-inferno-5500.firebaseio.com/classMentors/badges");
var sync = $firebase(ref);
$scope.data = sync.$asObject();
});
</script>
</body>
</html>