* Checks if `lView` is a descendant of `parentTNode` in `parentLView` (crossing view boundaries). * * `tNode.parent` is restricted to referring to nodes within the SAME view. When we cross * view boundaries (e.g., entering a component's internal view or an embedded view like `@if`), * `tNode.par
(lView: LView, parentLView: LView, parentTNode: TNode)
| 232 | * `parentLView`. |
| 233 | */ |
| 234 | function isLViewDescendantOfTNode(lView: LView, parentLView: LView, parentTNode: TNode): boolean { |
| 235 | let currentLView: LView | null = lView; |
| 236 | let hostTNode: TNode | null = null; |
| 237 | |
| 238 | while (currentLView && currentLView !== parentLView) { |
| 239 | hostTNode = currentLView[T_HOST]; |
| 240 | currentLView = getLViewParent(currentLView); |
| 241 | } |
| 242 | |
| 243 | return ( |
| 244 | currentLView === parentLView && hostTNode !== null && isTNodeDescendant(hostTNode, parentTNode) |
| 245 | ); |
| 246 | } |
| 247 | |
| 248 | /** Find the parent environment injector of the given injector. */ |
| 249 | function getParentEnvInjector(injector: Injector): Injector | undefined { |
no test coverage detected
searching dependent graphs…