MCPcopy Index your code
hub / github.com/angular/angular / createTemplateRef

Function createTemplateRef

packages/core/src/linker/template_ref.ts:130–140  ·  view source on GitHub ↗
(hostTNode: TNode, hostLView: LView)

Source from the content-addressed store, hash-verified

128 * @returns The TemplateRef instance or null if we can't create a TemplateRef on a given node type
129 */
130export function createTemplateRef<T>(hostTNode: TNode, hostLView: LView): TemplateRef<T> | null {
131 if (hostTNode.type & TNodeType.Container) {
132 ngDevMode && assertDefined(hostTNode.tView, 'TView must be allocated');
133 return new TemplateRef(
134 hostLView,
135 hostTNode as TContainerNode,
136 createElementRef(hostTNode, hostLView),
137 );
138 }
139 return null;
140}

Callers 4

ɵɵtemplateRefExtractorFunction · 0.90
createResultByTNodeTypeFunction · 0.90
createSpecialTokenFunction · 0.90
injectTemplateRefFunction · 0.85

Calls 2

assertDefinedFunction · 0.90
createElementRefFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…