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

Method embeddedTView

packages/core/src/render3/queries/query.ts:129–147  ·  view source on GitHub ↗
(tNode: TNode)

Source from the content-addressed store, hash-verified

127 }
128 }
129 embeddedTView(tNode: TNode): TQueries | null {
130 let queriesForTemplateRef: TQuery[] | null = null;
131
132 for (let i = 0; i < this.length; i++) {
133 const childQueryIndex = queriesForTemplateRef !== null ? queriesForTemplateRef.length : 0;
134 const tqueryClone = this.getByIndex(i).embeddedTView(tNode, childQueryIndex);
135
136 if (tqueryClone) {
137 tqueryClone.indexInDeclarationView = i;
138 if (queriesForTemplateRef !== null) {
139 queriesForTemplateRef.push(tqueryClone);
140 } else {
141 queriesForTemplateRef = [tqueryClone];
142 }
143 }
144 }
145
146 return queriesForTemplateRef !== null ? new TQueries_(queriesForTemplateRef) : null;
147 }
148
149 template(tView: TView, tNode: TNode): void {
150 ngDevMode &&

Callers

nothing calls this directly

Calls 3

getByIndexMethod · 0.95
embeddedTViewMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected