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

Function doBootstrap

test/angular/1.5/angular.js:1784–1819  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1782 };
1783 config = extend(defaultConfig, config);
1784 var doBootstrap = function() {
1785 element = jqLite(element);
1786
1787 if (element.injector()) {
1788 var tag = (element[0] === window.document) ? 'document' : startingTag(element);
1789 // Encode angle brackets to prevent input from being sanitized to empty string #8683.
1790 throw ngMinErr(
1791 'btstrpd',
1792 'App already bootstrapped with this element \'{0}\'',
1793 tag.replace(/</,'&lt;').replace(/>/,'&gt;'));
1794 }
1795
1796 modules = modules || [];
1797 modules.unshift(['$provide', function($provide) {
1798 $provide.value('$rootElement', element);
1799 }]);
1800
1801 if (config.debugInfoEnabled) {
1802 // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.
1803 modules.push(['$compileProvider', function($compileProvider) {
1804 $compileProvider.debugInfoEnabled(true);
1805 }]);
1806 }
1807
1808 modules.unshift('ng');
1809 var injector = createInjector(modules, config.strictDi);
1810 injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',
1811 function bootstrapApply(scope, element, compile, injector) {
1812 scope.$apply(function() {
1813 element.data('$injector', injector);
1814 compile(element)(scope);
1815 });
1816 }]
1817 );
1818 return injector;
1819 };
1820
1821 var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;
1822 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