refactor(ivy): replace LNode.nodeInjector with TNode.injectorIndex (#26177)
PR Close #26177
This commit is contained in:

committed by
Alex Rickabaugh

parent
2ad1bb4eb9
commit
68fadd9b97
@ -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:
|
||||
*
|
||||
|
Reference in New Issue
Block a user