0
我使用AngularFire使用AngularFire - 火力地堡对象是不确定的
npm install angularfire --save
在我app.js为此我已经安装AngularFire故宫的方式添加以下
require('angularfire');
angular.module('app', [ 'ui.router', 'firebase' ])
.constant('FirebaseUrl', 'https://<my-app>.firebaseio.com/'));
而且我创建我尝试注入Firebase对象的指令。
'use strict';
var chatDirective = function() {
return {
restrict : 'E',
template : require('./chat.tpl.html'),
controller: ['$state', 'AuthService', 'firebase',
function($state, AuthService, firebase) {
}]
}
};
在运行此操作时,我将指令中的Firebase对象的值设置为undefined。我错过了什么吗?