首页 文章

Firebase错误 - “FireBase未定义”

提问于
浏览
0

我正在尝试在我的应用程序中使用angularFire,我按照本指南(https://www.firebase.com/tutorial/#tutorial/angular/0),我甚至尝试了generator-angularfire,但无论如何,最初我得到:

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

我在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);

}]);

我在Index.html中添加了对firebase和angularfire的引用:

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

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

Obs:我也尝试其他版本 .

我该如何解决这个问题?

1 回答

  • 0

    我看到了同样的问题 . 这是一个错字 . 而不是FireBase,你必须编写Firebase .

相关问题