* Collects leave animations from nested views (containers only, NOT child components) * starting from the given TNode's children.
( lView: LView, tNode: TNode, collectedPromises: Promise<unknown>[], )
| 331 | * starting from the given TNode's children. |
| 332 | */ |
| 333 | function collectNestedViewAnimations( |
| 334 | lView: LView, |
| 335 | tNode: TNode, |
| 336 | collectedPromises: Promise<unknown>[], |
| 337 | ) { |
| 338 | // We explicitly DO NOT check for isComponentHost(tNode) and traverse into it here. |
| 339 | // This scopes the nested leave animations to the current component template only. |
| 340 | |
| 341 | if (tNode.type & TNodeType.AnyContainer) { |
| 342 | const lContainer = lView[tNode.index]; |
| 343 | if (isLContainer(lContainer)) { |
| 344 | for (let i = CONTAINER_HEADER_OFFSET; i < lContainer.length; i++) { |
| 345 | const subView = lContainer[i] as LView; |
| 346 | if (subView[TVIEW].type === TViewType.Embedded) { |
| 347 | collectAllViewLeaveAnimations(subView, collectedPromises); |
| 348 | } |
| 349 | } |
| 350 | } |
| 351 | } |
| 352 | |
| 353 | let child = tNode.child; |
| 354 | while (child) { |
| 355 | collectNestedViewAnimations(lView, child, collectedPromises); |
| 356 | child = child.next; |
| 357 | } |
| 358 | } |
| 359 | |
| 360 | /** |
| 361 | * Recursively collects all leave animations from a view and its children. |
no test coverage detected