I am new at angularjs. I am looking an application code.
<html>
.....
<script src="/my/app.main.js"></script>
<script src="/my/app.messages.js"></script>
<script src="/my/app.misc.js"></script>
<script src="/my/app.properties.js"></script>
and in these javascript filse icluding angularjs modules same name.
main.js file
(function () {
'use strict';
var app = angular.module('ngCookService');
app.run([.....
function (....) {
}]);
})();
messages.js file
(function () {
"use strict";
var app = angular.module('ngCookService');
app.config(['$stateProvider', function ($stateProvider) {
................
}]);
})();
All of these js files include ngCookService module. And modules defined in self-invoking functions.
How this system works? Does earlier defined modules overriding? or new defined app module kills earlier objects?