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

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

问题描述

我正在尝试在我的应用程序中使用 angularFire,我遵循了本指南(https://www.firebase.com/tutorial/#tutorial/angular/0),我什至尝试了 generator-angularfire,但是两次,最初我都得到:

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 未定义

我在我的 AngularJS App.js 中使用此代码:

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

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

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

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

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 的这些引用:

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:我也尝试过其他版本.

我该如何解决这个问题?

How do I resolve this issue ?

推荐答案

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

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

这篇关于Firebase 错误 - “FireBase 未定义"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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