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

Function getRootNodes

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

Source from the content-addressed store, hash-verified

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