(hydrationInfo: DehydratedView, index: number)
| 448 | * container host node, e.g. <ng-container *ngIf>). |
| 449 | */ |
| 450 | export function getNgContainerSize(hydrationInfo: DehydratedView, index: number): number | null { |
| 451 | const data = hydrationInfo.data; |
| 452 | let size = data[ELEMENT_CONTAINERS]?.[index] ?? null; |
| 453 | // If there is no serialized information available in the `ELEMENT_CONTAINERS` slot, |
| 454 | // check if we have info about view containers at this location (e.g. |
| 455 | // `<ng-container *ngIf>`) and use container size as a number of root nodes in this |
| 456 | // element container. |
| 457 | if (size === null && data[CONTAINERS]?.[index]) { |
| 458 | size = calcSerializedContainerSize(hydrationInfo, index); |
| 459 | } |
| 460 | return size; |
| 461 | } |
| 462 | |
| 463 | export function isSerializedElementContainer( |
| 464 | hydrationInfo: DehydratedView, |
no test coverage detected
searching dependent graphs…