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

Function getBeforeNodeForView

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

Source from the content-addressed store, hash-verified

763}
764
765export function getBeforeNodeForView(
766 viewIndexInContainer: number,
767 lContainer: LContainer,
768): RNode | null {
769 const nextViewIndex = CONTAINER_HEADER_OFFSET + viewIndexInContainer + 1;
770 if (nextViewIndex < lContainer.length) {
771 const lView = lContainer[nextViewIndex] as LView;
772 const firstTNodeOfView = lView[TVIEW].firstChild;
773 if (firstTNodeOfView !== null) {
774 return getFirstNativeNode(lView, firstTNodeOfView);
775 }
776 }
777
778 return lContainer[NATIVE];
779}
780
781/**
782 * 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