MCPcopy Create free account
hub / github.com/angular/angular / getRootNodes

Function getRootNodes

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 4

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

Tested by

no test coverage detected