I'm try to inject service to directive, and it's throwing error
Error: [$injector:unpr] Unknown provider: $scopeProvider <- $scope <- AppService <- scoreDirective
this is my Directive
angular.module('MyApp.directives').directive('score', ['$compile', 'AppService', function($compile, AppService) {
return {
restrict: "E",
scope: {},
templateUrl: 'dashboard/score.html',
controller: ['$scope', function ($scope) {
}],
link: function(scope, element, attrs, controller, firebase) {
// some code here
}
}
}]);
And this is Service
'use strict';
angular.module('MyApp.services').service('AppService', function($scope, $firebase, FIREBASE_ROOT) {
// some code here
});
Wat I am doing wrong?