I have a module with a service defined:

```
var ngError = angular.module('ngError', []);

ngError.service('ErrorService', ['$scope', function($scope) {
    $scope.displayErrors = function(errors) {
        alert(errors);
    }
}]);

```

Then I have another module:

```
var ngLogin = angular.module('ngLogin', ['ngError']);

```

Which has a controller that attempts to use the first service defined on `ngError`:

```
ngLogin.controller('LoginCtrl', ['$scope', 'LoginService', 'ErrorService', function($scope, LoginService, ErrorService) {
    $scope.user = {};
    $scope.user.id = 0;
    $scope.user.token = '';

    $scope.login = function(callback) {
     LoginService.login($scope.user.username, $scope.user.password, function(token) {
        $scope.setToken(token);
        $scope.$apply();
        if (typeof callback === 'function') {
            callback(callback);
        }
     }, function(errors) {
        ErrorService.displayErrors(errors);
     });
};
}]);

```

But some reason this is throwing the following error:

```
Unknown provider: $scopeProvider <- $scope <- ErrorService

```