MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / doBootstrap

Function doBootstrap

code/songhop/www/lib/angular/angular.js:1413–1448  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1411 };
1412 config = extend(defaultConfig, config);
1413 var doBootstrap = function() {
1414 element = jqLite(element);
1415
1416 if (element.injector()) {
1417 var tag = (element[0] === document) ? 'document' : startingTag(element);
1418 //Encode angle brackets to prevent input from being sanitized to empty string #8683
1419 throw ngMinErr(
1420 'btstrpd',
1421 "App Already Bootstrapped with this Element '{0}'",
1422 tag.replace(/</,'&lt;').replace(/>/,'&gt;'));
1423 }
1424
1425 modules = modules || [];
1426 modules.unshift(['$provide', function($provide) {
1427 $provide.value('$rootElement', element);
1428 }]);
1429
1430 if (config.debugInfoEnabled) {
1431 // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.
1432 modules.push(['$compileProvider', function($compileProvider) {
1433 $compileProvider.debugInfoEnabled(true);
1434 }]);
1435 }
1436
1437 modules.unshift('ng');
1438 var injector = createInjector(modules, config.strictDi);
1439 injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',
1440 function bootstrapApply(scope, element, compile, injector) {
1441 scope.$apply(function() {
1442 element.data('$injector', injector);
1443 compile(element)(scope);
1444 });
1445 }]
1446 );
1447 return injector;
1448 };
1449
1450 var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;
1451 var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;

Callers 1

bootstrapFunction · 0.70

Calls 3

startingTagFunction · 0.70
createInjectorFunction · 0.70
compileFunction · 0.70

Tested by

no test coverage detected