refactor(ivy): LContainer now stored in LView[PARENT] (#28382)

- Removes CONTAINER_INDEX
- LView[PARENT] now contains LContainer when necessary
- Removes now unused arguments to methods after refactor

PR Close #28382
This commit is contained in:
Ben Lesh
2019-01-28 14:45:31 -08:00
parent f0f81f482e
commit ba6aa93aa3
19 changed files with 235 additions and 159 deletions

View File

@ -8,12 +8,14 @@
import {assertDefined} from '../util/assert';
import {assertLViewOrUndefined} from './assert';
import {executeHooks} from './hooks';
import {ComponentDef, DirectiveDef} from './interfaces/definition';
import {TElementNode, TNode, TViewNode} from './interfaces/node';
import {BINDING_INDEX, CONTEXT, DECLARATION_VIEW, FLAGS, InitPhaseState, LView, LViewFlags, OpaqueViewState, TVIEW} from './interfaces/view';
/**
* Store the element depth count. This is used to identify the root elements of the template
* so that we can than attach `LView` to only those elements.
@ -142,6 +144,7 @@ export function setPreviousOrParentTNode(tNode: TNode) {
}
export function setTNodeAndViewData(tNode: TNode, view: LView) {
ngDevMode && assertLViewOrUndefined(view);
previousOrParentTNode = tNode;
lView = view;
}
@ -249,6 +252,7 @@ export function setCurrentQueryIndex(value: number): void {
* @returns the previous state;
*/
export function enterView(newView: LView, hostTNode: TElementNode | TViewNode | null): LView {
ngDevMode && assertLViewOrUndefined(newView);
const oldView = lView;
if (newView) {
const tView = newView[TVIEW];