mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
The context of an embedded view ref at some point was switched from a getter to an actual assignable property. This is something we reverted with the previous commit as it introduces additional complexity for our generated code (in terms of closures capturing the `ctx`). This change impacted the template outlet code because we actively relied on swapping out the full context if the user changes it. Previousl, before we allowed to swap out the context (in v16), we mutated the initial view context if it didn't change structurally- and in other cases the view was re-created. We improved this performance aspect with the changes to allow for the context to be swapped out + actually also fixed a bug where the initial context object was mutated and the user could observe this change. This commit adjusts for context not being replacable- while still keeping the bugs fixed and preserving the performance wins of not having to destroy/re-create the view whenever the context changes. Benchmarks: https://hackmd.io/J0Ci_JzxQ0K1AA1omXhIQQ PR Close #51887 |
||
|---|---|---|
| .. | ||
| directives | ||
| i18n | ||
| image_loaders | ||
| location | ||
| pipes | ||
| BUILD.bazel | ||
| cookie_spec.ts | ||
| viewport_scroller_spec.ts | ||