refactor(ivy): replace LNode.nodeInjector with TNode.injectorIndex (#26177)

PR Close #26177
This commit is contained in:
Kara Erickson
2018-09-28 21:26:45 -07:00
committed by Alex Rickabaugh
parent 2ad1bb4eb9
commit 68fadd9b97
12 changed files with 418 additions and 93 deletions

View File

@ -81,9 +81,6 @@ export interface LNode {
*/
readonly data: LViewData|LContainer|null;
/** The injector associated with this node. Necessary for DI. */
nodeInjector: LInjector|null;
/**
* A pointer to an LContainerNode created by directives requesting ViewContainerRef
*/
@ -196,6 +193,21 @@ export interface TNode {
*/
index: number;
/**
* The index of the closest injector in this node's LViewData.
*
* If the index === -1, there is no injector on this node or any ancestor node in this view.
*
* If the index !== -1, it is the index of this node's injector OR the index of a parent injector
* in the same view. We pass the parent injector index down the node tree of a view so it's
* possible to find the parent injector without walking a potentially deep node tree. Injector
* indices are not set across view boundaries because there could be multiple component hosts.
*
* If tNode.injectorIndex === tNode.parent.injectorIndex, then the index belongs to a parent
* injector.
*/
injectorIndex: number;
/**
* This number stores two values using its bits:
*