Firebase错误 - “FireBase未定义” [英] Firebase Error - "FireBase is not defined"

查看:213
本文介绍了Firebase错误 - “FireBase未定义”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的应用程序中使用angularFire,我遵循本指南( https: //www.firebase.com/tutorial/#tutorial/angular/0 ),而且我甚至试过了generator-angularfire,不过这两次,最初都是这样的:

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


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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆