MCPcopy
hub / github.com/angular/angular / store

Function store

packages/core/src/render3/util/view_utils.ts:142–150  ·  view source on GitHub ↗
(tView: TView, lView: LView, index: number, value: T)

Source from the content-addressed store, hash-verified

140
141/** Store a value in the `data` at a given `index`. */
142export function store<T>(tView: TView, lView: LView, index: number, value: T): void {
143 // We don't store any static data for local variables, so the first time
144 // we see the template, we should store as null to avoid a sparse array
145 if (index >= tView.data.length) {
146 tView.data[index] = null;
147 tView.blueprint[index] = null;
148 }
149 lView[index] = value;
150}
151
152export function getComponentLViewByIndex(nodeIndex: number, hostView: LView): LView {
153 // Could be an LView or an LContainer. If LContainer, unwrap to find LView.

Callers 3

ɵɵpipeFunction · 0.90
ɵɵdeclareLetFunction · 0.90
ɵɵstoreLetFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…