MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / doBootstrap

Function doBootstrap

lib/test/angular/1.5.0/angular.js:1666–1701  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1664 };
1665 config = extend(defaultConfig, config);
1666 var doBootstrap = function() {
1667 element = jqLite(element);
1668
1669 if (element.injector()) {
1670 var tag = (element[0] === document) ? 'document' : startingTag(element);
1671 //Encode angle brackets to prevent input from being sanitized to empty string #8683
1672 throw ngMinErr(
1673 'btstrpd',
1674 "App Already Bootstrapped with this Element '{0}'",
1675 tag.replace(/</,'&lt;').replace(/>/,'&gt;'));
1676 }
1677
1678 modules = modules || [];
1679 modules.unshift(['$provide', function($provide) {
1680 $provide.value('$rootElement', element);
1681 }]);
1682
1683 if (config.debugInfoEnabled) {
1684 // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.
1685 modules.push(['$compileProvider', function($compileProvider) {
1686 $compileProvider.debugInfoEnabled(true);
1687 }]);
1688 }
1689
1690 modules.unshift('ng');
1691 var injector = createInjector(modules, config.strictDi);
1692 injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',
1693 function bootstrapApply(scope, element, compile, injector) {
1694 scope.$apply(function() {
1695 element.data('$injector', injector);
1696 compile(element)(scope);
1697 });
1698 }]
1699 );
1700 return injector;
1701 };
1702
1703 var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;
1704 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