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

Function enterView

packages/core/src/render3/state.ts:634–658  ·  view source on GitHub ↗
(newView: LView)

Source from the content-addressed store, hash-verified

632 * @returns the previously active lView;
633 */
634export function enterView(newView: LView): void {
635 ngDevMode && assertNotEqual(newView[0], newView[1] as any, '????');
636 ngDevMode && assertLViewOrUndefined(newView);
637 const newLFrame = allocLFrame();
638 if (ngDevMode) {
639 assertEqual(newLFrame.isParent, true, 'Expected clean LFrame');
640 assertEqual(newLFrame.lView, null, 'Expected clean LFrame');
641 assertEqual(newLFrame.tView, null, 'Expected clean LFrame');
642 assertEqual(newLFrame.selectedIndex, -1, 'Expected clean LFrame');
643 assertEqual(newLFrame.elementDepthCount, 0, 'Expected clean LFrame');
644 assertEqual(newLFrame.currentDirectiveIndex, -1, 'Expected clean LFrame');
645 assertEqual(newLFrame.currentNamespace, null, 'Expected clean LFrame');
646 assertEqual(newLFrame.bindingRootIndex, -1, 'Expected clean LFrame');
647 assertEqual(newLFrame.currentQueryIndex, 0, 'Expected clean LFrame');
648 }
649 const tView = newView[TVIEW];
650 instructionState.lFrame = newLFrame;
651 ngDevMode && tView.firstChild && assertTNodeForTView(tView.firstChild, tView);
652 newLFrame.currentTNode = tView.firstChild!;
653 newLFrame.lView = newView;
654 newLFrame.tView = tView;
655 newLFrame.contextLView = newView;
656 newLFrame.bindingIndex = tView.bindingStartIndex;
657 newLFrame.inI18n = false;
658}
659
660/**
661 * Allocates next free LFrame. This function tries to reuse the `LFrame`s to lower memory pressure.

Callers 9

enterViewMethod · 0.90
di_spec.tsFile · 0.90
enterViewWithOneDivFunction · 0.90
createComponentRefMethod · 0.90
renderViewFunction · 0.90
refreshViewFunction · 0.90

Calls 5

assertNotEqualFunction · 0.90
assertLViewOrUndefinedFunction · 0.90
assertEqualFunction · 0.90
assertTNodeForTViewFunction · 0.90
allocLFrameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…