mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This commit adds serialization and hydration logic for content projection. While hydration for regular elements relies on their location in the TNode tree, the content projection may move elements around, so in order to hydrate them correcty, the runtime needs some extra information. This commit adds a serialization logic that adds element locations (instructions on how to navigate to a particular element from another known location of other element) into the hydration state for the following cases: - when a TNode is a first element in projection segment (other nodes are linked from that node) - when a TNode's next sibling is different before and after projection (we serialize extra info about the template-based sibling) - when a TNode's previous sibling was a content projection (i.e. `<ng-content>` slot), because we can not rely on the previous element in this case (projection happens at a later point) PR Close #49454 |
||
|---|---|---|
| .. | ||
| compression_spec.ts | ||