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

Function doBootstrap

lib/test/angular/1.6.7/angular.js:1930–1965  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1928 };
1929 config = extend(defaultConfig, config);
1930 var doBootstrap = function() {
1931 element = jqLite(element);
1932
1933 if (element.injector()) {
1934 var tag = (element[0] === window.document) ? 'document' : startingTag(element);
1935 // Encode angle brackets to prevent input from being sanitized to empty string #8683.
1936 throw ngMinErr(
1937 'btstrpd',
1938 'App already bootstrapped with this element \'{0}\'',
1939 tag.replace(/</,'&lt;').replace(/>/,'&gt;'));
1940 }
1941
1942 modules = modules || [];
1943 modules.unshift(['$provide', function($provide) {
1944 $provide.value('$rootElement', element);
1945 }]);
1946
1947 if (config.debugInfoEnabled) {
1948 // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.
1949 modules.push(['$compileProvider', function($compileProvider) {
1950 $compileProvider.debugInfoEnabled(true);
1951 }]);
1952 }
1953
1954 modules.unshift('ng');
1955 var injector = createInjector(modules, config.strictDi);
1956 injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',
1957 function bootstrapApply(scope, element, compile, injector) {
1958 scope.$apply(function() {
1959 element.data('$injector', injector);
1960 compile(element)(scope);
1961 });
1962 }]
1963 );
1964 return injector;
1965 };
1966
1967 var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;
1968 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