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

Function constructDetailsForInterpolation

packages/core/src/render3/errors.ts:102–118  ·  view source on GitHub ↗
(
  lView: LView,
  rootIndex: number,
  expressionIndex: number,
  meta: string,
  changedValue: any,
)

Source from the content-addressed store, hash-verified

100}
101
102function constructDetailsForInterpolation(
103 lView: LView,
104 rootIndex: number,
105 expressionIndex: number,
106 meta: string,
107 changedValue: any,
108) {
109 const [propName, prefix, ...chunks] = meta.split(INTERPOLATION_DELIMITER);
110 let oldValue = prefix,
111 newValue = prefix;
112 for (let i = 0; i < chunks.length; i++) {
113 const slotIdx = rootIndex + i;
114 oldValue += `${lView[slotIdx]}${chunks[i]}`;
115 newValue += `${slotIdx === expressionIndex ? changedValue : lView[slotIdx]}${chunks[i]}`;
116 }
117 return {propName, oldValue, newValue};
118}
119
120/**
121 * Constructs an object that contains details for the ExpressionChangedAfterItHasBeenCheckedError:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…