未捕获错误:[$ injector:unpr]未知提供者:angularFireAuthProvider< - angularFireAuth

时间:2014-05-09 21:01:51

标签: firebase angularfire

我在.html中使用以下库

<script src="https://cdn.firebase.com/js/client/1.0.11/firebase.js"></script>
<script src="https://cdn.firebase.com/libs/angularfire/0.7.1/angularfire.min.js"></script>
<script src='https://cdn.firebase.com/js/simple-login/1.4.1/firebase-simple-login.js'>
</script>

在尝试将简单聊天集成到我的网站时:

angular.module('habitApp.controllers.chatRoom', ['firebase'])
.controller('ChatController', 
   function ($scope, $firebase) { 
    var ref = new Firebase('https://xxx.firebaseio.com');
    $scope.messages = $firebase(ref);
    $scope.addMessage = function () {
       $scope.messages.$add({from: $scope.name, body: $scope.msg});
       $scope.msg="";
    };
    }); 

我得到一个常数错误“Uncaught Error:[$ injector:unpr]未知提供者:angularFireAuthProvider&lt; - angularFireAuth”

请帮忙。

0 个答案:

没有答案