angularjs module dependencies angularjs module dependencies angularjs angularjs

angularjs module dependencies


breeze is not a module - it's a value (shorthand for service) in the domiciliations module: value('breeze', window.breeze);.

When you do:

angular.module('domiciliations.service', ['ngResource', 'breeze', 'loggerService']).  factory('Domiciliation', function ($resource, breeze, logger) {}

You configure the domiciliations.service module with dependencies to the modules ngResource, breeze and loggerService. Angular can't find the breeze module and throws an exception.

Assuming loggerService is a module and logger is a service in this module, the following should work (breeze and logger will get injected in the factory function):

angular.module('domiciliations.service', ['ngResource','loggerService']).   factory('Domiciliation', ['$resource','breeze','logger',     function ($resource, breeze, logger) {    }  ])