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

Function addToEndOfViewTree

packages/core/src/render3/view/construction.ts:320–335  ·  view source on GitHub ↗
(
  lView: LView,
  lViewOrLContainer: T,
)

Source from the content-addressed store, hash-verified

318 * @returns The state passed in
319 */
320export function addToEndOfViewTree<T extends LView | LContainer>(
321 lView: LView,
322 lViewOrLContainer: T,
323): T {
324 // TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer
325 // to the end of the queue, which means if the developer retrieves the LContainers from RNodes out
326 // of order, the change detection will run out of order, as the act of retrieving the
327 // LContainer from the RNode is what adds it to the queue.
328 if (lView[CHILD_HEAD]) {
329 lView[CHILD_TAIL]![NEXT] = lViewOrLContainer;
330 } else {
331 lView[CHILD_HEAD] = lViewOrLContainer;
332 }
333 lView[CHILD_TAIL] = lViewOrLContainer;
334 return lViewOrLContainer;
335}

Callers 3

createContainerRefFunction · 0.90
templateCreateFunction · 0.90
createComponentLViewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…