I am using AngularFire the npm way for which I have installed AngularFire using
npm install angularfire --save
In my app.js I added the following
require('angularfire');
angular.module('app', [ 'ui.router', 'firebase' ])
.constant('FirebaseUrl', 'https://<my-app>.firebaseio.com/'));
And I am creating a directive to which I am trying to inject the Firebase object.
'use strict';
var chatDirective = function() {
return {
restrict : 'E',
template : require('./chat.tpl.html'),
controller: ['$state', 'AuthService', 'firebase',
function($state, AuthService, firebase) {
}]
}
};
On running this I am getting the value of Firebase object in the directive as undefined. Am I missing something?