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

Function doBootstrap

lib/test/angular/1.7.0/angular.js:1898–1933  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1896 };
1897 config = extend(defaultConfig, config);
1898 var doBootstrap = function() {
1899 element = jqLite(element);
1900
1901 if (element.injector()) {
1902 var tag = (element[0] === window.document) ? 'document' : startingTag(element);
1903 // Encode angle brackets to prevent input from being sanitized to empty string #8683.
1904 throw ngMinErr(
1905 'btstrpd',
1906 'App already bootstrapped with this element \'{0}\'',
1907 tag.replace(/</,'&lt;').replace(/>/,'&gt;'));
1908 }
1909
1910 modules = modules || [];
1911 modules.unshift(['$provide', function($provide) {
1912 $provide.value('$rootElement', element);
1913 }]);
1914
1915 if (config.debugInfoEnabled) {
1916 // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.
1917 modules.push(['$compileProvider', function($compileProvider) {
1918 $compileProvider.debugInfoEnabled(true);
1919 }]);
1920 }
1921
1922 modules.unshift('ng');
1923 var injector = createInjector(modules, config.strictDi);
1924 injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',
1925 function bootstrapApply(scope, element, compile, injector) {
1926 scope.$apply(function() {
1927 element.data('$injector', injector);
1928 compile(element)(scope);
1929 });
1930 }]
1931 );
1932 return injector;
1933 };
1934
1935 var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;
1936 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