0
votes

I am trying to utilize angularFire in my app, I followed this guide (https://www.firebase.com/tutorial/#tutorial/angular/0), and I even tried generator-angularfire, however both times, initially I get :

- angular.js:12330 ReferenceError: FireBase is not defined

I'm using this code in my AngularJS App.js :

var macApp = angular.module('macApp', ['firebase']);

macApp.controller('ProdutosCtrl', ['$scope', '$firebaseArray', function ($scope, $firebaseArray) {

var meusProdutos = new FireBase("https://blistering-torch-5296.firebaseio.com/produtos/");
$scope.produtos = $firebaseArray(meusProdutos);

}]);

I added these references to firebase and angularfire in my Index.html:

"https://cdn.firebase.com/js/client/2.2.1/firebase.js"

"https://cdn.firebase.com/libs/angularfire/1.0.0/angularfire.min.js"

Obs: I also try other versions too.

How do I resolve this issue ?

1
JavaScript is case-sensitive, it's Firebase not FireBase.Frank van Puffelen
Very grateful, I didn't realize this detailMiriam Estela Siqueira
You're welcome. I'll vote to close this question though, since it seems unlikely that someone in the same situation will find it.Frank van Puffelen

1 Answers

0
votes

I saw the same issue. It is a typo. Instead of FireBase you have to write Firebase.