Je suis l'exemple Getting started with Firebase and Angular - Firecasts #4 et je continue à obtenir :
Uncaught ReferenceError: Firebase is not defined.
Des idées ?
Voici mon app.js :
angular
.module('app', ['ngRoute', 'firebase'])
.constant('FirebaseUrl', 'https://<my-app>.firebaseio.com/')
.service('rootRef', ['FirebaseUrl', Firebase])
.service('users', Users)
.controller('MyCtrl', MyController)
.config(ApplicationConfig);
function ApplicationConfig($routeProvider) {
$routeProvider.when('/', {
controller: 'MyCtrl as ctrl',
templateUrl: 'views/myctrl.html'
});
}
function Users(rootRef, $firebaseObject, $firebaseArray) {
var usersRef = rootRef.child('users');
this.get = function get(id) {
return $firebaseObject(usersRef.child(id));
};
this.all = function all() {
return $firebaseArray(usersRef);
};
}
function MyController(users) {
this.users = users.all();
}
Voici mon index.html :
<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
<meta charset="UTF-8">
<title>AngularFire</title>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/firebase/firebase.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<script src="bower_components/angularfire/dist/angularfire.js"></script>
<script src="app.js"></script>
</head>
<body>
<ng-view></ng-view>
</body>
</html>