MCPcopy
hub / github.com/angular-ui/ui-grid / doBootstrap

Function doBootstrap

lib/test/angular/1.4.3/angular.js:1605–1640  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1603 };
1604 config = extend(defaultConfig, config);
1605 var doBootstrap = function() {
1606 element = jqLite(element);
1607
1608 if (element.injector()) {
1609 var tag = (element[0] === document) ? 'document' : startingTag(element);
1610 //Encode angle brackets to prevent input from being sanitized to empty string #8683
1611 throw ngMinErr(
1612 'btstrpd',
1613 "App Already Bootstrapped with this Element '{0}'",
1614 tag.replace(/</,'&lt;').replace(/>/,'&gt;'));
1615 }
1616
1617 modules = modules || [];
1618 modules.unshift(['$provide', function($provide) {
1619 $provide.value('$rootElement', element);
1620 }]);
1621
1622 if (config.debugInfoEnabled) {
1623 // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.
1624 modules.push(['$compileProvider', function($compileProvider) {
1625 $compileProvider.debugInfoEnabled(true);
1626 }]);
1627 }
1628
1629 modules.unshift('ng');
1630 var injector = createInjector(modules, config.strictDi);
1631 injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',
1632 function bootstrapApply(scope, element, compile, injector) {
1633 scope.$apply(function() {
1634 element.data('$injector', injector);
1635 compile(element)(scope);
1636 });
1637 }]
1638 );
1639 return injector;
1640 };
1641
1642 var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;
1643 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