MCPcopy
hub / github.com/angular/angular / createRootEl

Function createRootEl

packages/core/test/application_ref_spec.ts:72–82  ·  view source on GitHub ↗
(selector = 'bootstrap-app')

Source from the content-addressed store, hash-verified

70 });
71
72 function createRootEl(selector = 'bootstrap-app') {
73 const doc = TestBed.inject(DOCUMENT);
74 const rootEl = <HTMLElement>(
75 getContent(createTemplate(`<${selector}></${selector}>`)).firstChild
76 );
77 const oldRoots = doc.querySelectorAll(selector);
78 for (let i = 0; i < oldRoots.length; i++) {
79 getDOM().remove(oldRoots[i]);
80 }
81 doc.body.appendChild(rootEl);
82 }
83
84 type CreateModuleOptions = {
85 providers?: any[];

Callers 1

Calls 6

getContentFunction · 0.90
createTemplateFunction · 0.90
getDOMFunction · 0.85
injectMethod · 0.65
removeMethod · 0.65
appendChildMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…