Firebase错误 - “FireBase未定义” [英] Firebase Error - "FireBase is not defined"
问题描述
- angular.js:12330 ReferenceError:未定义FireBase
我在AngularJS App.js中使用这段代码:
var macApp = angular.module('macApp',['firebase']);
$ b
macApp。控制器('ProdutosCtrl',''$ scope','$ firebaseArray',函数($ scope,$ firebaseArray){
var meusProdutos = new FireBase(https://blistering-torch-5296.firebaseio.com/produtos/);
$ scope.produtos = $ firebaseArray(meusProdutos);
$ c $我在索引中添加了对firebase和angularfire的引用.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:我也试试其他版本。
我该如何解决这个问题?
解决方案我看到了同样的问题。这是一个错字。而不是FireBase,您必须编写Firebase。
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 ?
解决方案 I saw the same issue. It is a typo. Instead of FireBase you have to write Firebase.
这篇关于Firebase错误 - “FireBase未定义”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文