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

Function getBeforeNodeForView

packages/core/src/render3/node_manipulation.ts:740–754  ·  view source on GitHub ↗
(
  viewIndexInContainer: number,
  lContainer: LContainer,
)

Source from the content-addressed store, hash-verified

738}
739
740export function getBeforeNodeForView(
741 viewIndexInContainer: number,
742 lContainer: LContainer,
743): RNode | null {
744 const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;
745 if (nextViewIndex < lContainer.length) {
746 const lView = lContainer[nextViewIndex] as LView;
747 const firstTNodeOfView = lView[TVIEW].firstChild;
748 if (firstTNodeOfView !== null) {
749 return getFirstNativeNode(lView, firstTNodeOfView);
750 }
751 }
752
753 return lContainer[NATIVE];
754}
755
756/**
757 * Performs the operation of `action` on the node. Typically this involves inserting or removing

Callers 2

addLViewToLContainerFunction · 0.90
getFirstNativeNodeFunction · 0.85

Calls 1

getFirstNativeNodeFunction · 0.85

Tested by

no test coverage detected