it will be ng and no, it will not introduce other modules. Check out the angular source code for the bootstrap function . Therefore, when angular loads and the document is ready, angularInit will be called to find the element with ng-app and the module, and then call bootstrap . if the module is not defined, you can refer to the logic below, ng does not switch to the array of modules as the default module.
function bootstrap(element, modules) { var doBootstrap = function() { element = jqLite(element); if (element.injector()) { var tag = (element[0] === document) ? 'document' : startingTag(element); throw ngMinErr('btstrpd', "App Already Bootstrapped with this Element '{0}'", tag); } modules = modules || []; modules.unshift(['$provide', function($provide) { $provide.value('$rootElement', element); }]); modules.unshift('ng'); var injector = createInjector(modules); injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector', '$animate', function(scope, element, compile, injector, animate) { scope.$apply(function() { element.data('$injector', injector); compile(element)(scope); }); }] ); return injector; };
source share