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

Function ingestReferences

packages/compiler/src/template/pipeline/src/ingest.ts:1916–1924  ·  view source on GitHub ↗

* Process all of the local references on an element-like structure in the template AST and * convert them to their IR representation.

(op: ir.ElementOpBase, element: t.Element | t.Template)

Source from the content-addressed store, hash-verified

1914 * convert them to their IR representation.
1915 */
1916function ingestReferences(op: ir.ElementOpBase, element: t.Element | t.Template): void {
1917 assertIsArray<ir.LocalRef>(op.localRefs);
1918 for (const {name, value} of element.references) {
1919 op.localRefs.push({
1920 name,
1921 target: value,
1922 });
1923 }
1924}
1925
1926/**
1927 * Assert that the given value is an array.

Callers 2

ingestElementFunction · 0.85
ingestTemplateFunction · 0.85

Calls 2

assertIsArrayFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected