MCPcopy
hub / github.com/angular/angular / getRootNodes

Function getRootNodes

packages/core/test/acceptance/template_ref_spec.ts:33–45  ·  view source on GitHub ↗
(template: string)

Source from the content-addressed store, hash-verified

31 }
32
33 function getRootNodes(template: string): any[] {
34 TestBed.configureTestingModule({
35 declarations: [App],
36 });
37 TestBed.overrideTemplate(App, template);
38 const fixture = TestBed.createComponent(App);
39 fixture.detectChanges();
40
41 const embeddedView = fixture.componentInstance.templateRef.createEmbeddedView({});
42 embeddedView.detectChanges();
43
44 return embeddedView.rootNodes;
45 }
46
47 it('should return root render nodes for an embedded view instance', () => {
48 const rootNodes = getRootNodes(

Callers 1

Calls 5

overrideTemplateMethod · 0.65
createComponentMethod · 0.65
createEmbeddedViewMethod · 0.65
detectChangesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…