angularjs-styleguide
angularjs-styleguide copied to clipboard
Circular dependencies
By defining a service recipe in the "module" file, the result can be a circular dependency:
(A.module.js)
import AService from './A.service';
import BModule from 'app/B/B.module';
export default angular
.module('A', [BModule])
.service('AService', AService)
.name;
(B.module.js)
import AModule from 'app/A/A.module'; // will be `undefined`
import BService from './B.service';
export default angular
.module('B', [AModule])
.service('BService', BService)
.name;