angular/packages/platform-server
Andrew Kushnir ced237693a refactor(core): adding hydration for content projection (#49454)
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
2023-03-21 17:42:53 +01:00
..
init fix(platform-server): bundle @angular/domino in via esbuild (#49229) 2023-02-28 13:34:50 -08:00
src refactor(platform-server): remove ServerStylesHost (#49424) 2023-03-17 10:46:03 +01:00
test refactor(core): adding hydration for content projection (#49454) 2023-03-21 17:42:53 +01:00
testing build: reformat BUILD files (#48181) 2022-11-22 21:22:34 +00:00
BUILD.bazel fix(platform-server): bundle @angular/domino in via esbuild (#49229) 2023-02-28 13:34:50 -08:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json fix(platform-server): bundle @angular/domino in via esbuild (#49229) 2023-02-28 13:34:50 -08:00
PACKAGE.md docs: add platform to glossary (#30731) 2019-06-12 11:46:25 -07:00
public_api.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00