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

@ -15,7 +15,7 @@ import {checkNoChangesInRootView, checkNoChangesInternal, detectChangesInRootVie
import {TNode, TNodeType, TViewNode} from './interfaces/node';
import {FLAGS, HOST, LView, LViewFlags, PARENT, T_HOST} from './interfaces/view';
import {destroyLView} from './node_manipulation';
import {getNativeByTNode} from './util';
import {getLViewParent, getNativeByTNode} from './util';
@ -271,7 +271,7 @@ export class ViewRef<T> implements viewEngine_EmbeddedViewRef<T>, viewEngine_Int
}
private _lookUpContext(): T {
return this._context = this._lView[PARENT] ![this._componentIndex] as T;
return this._context = getLViewParent(this._lView) ![this._componentIndex] as T;
}
}