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

Function getBeforeNodeForView

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

Source from the content-addressed store, hash-verified

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