The structure of my modules looks like this:
angular.module('mainModule',["cityModule", "countryModule"]);
angular.module('mapModule',[]);
angular.module('cityModule',["mapModule"]);
angular.module('countryModule',["mapModule"]);
The main module includes countryModule
and cityModule
. Both cityModule
and countryModule
depend on the mapModule
.
I have a configuration set up in the mapModule.
angular.module("mapModule").config([function () {
console.log("this is map config")
}]);
When I check the console, I notice that it only logs "this is map config" once. However, both cityModule and countryModule reference the mapModule. Shouldn't it log twice? Why does it only log once?
(I also observe that if I had a provider within mapModule, the console would still show the message only once.)