angular/packages/common/test/directives
Paul Gschwendtner 7426948ff6 refactor(common): update NgTemplateOutlet to no longer rely on context swapping (#51887)
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
2023-10-04 08:14:35 -07:00
..
ng_class_spec.ts perf(common): avoid excessive DOM mutation in NgClass (#48433) 2023-01-13 10:38:54 -08:00
ng_component_outlet_spec.ts feat(common): add component input binding support for NgComponentOutlet (#51148) 2023-07-25 09:16:19 -07:00
ng_for_spec.ts refactor(common): create an NgFor alias for NgForOf directive (#47309) 2022-09-09 14:04:54 -07:00
ng_if_spec.ts feat(common): make the CommonModule directives standalone (#46469) 2022-06-28 12:55:25 -07:00
ng_optimized_image_spec.ts build: align with internal tsconfig options (#51728) 2023-09-12 11:39:42 -07:00
ng_plural_spec.ts refactor(common): add missing override to satisfy the linter (#49599) 2023-03-28 10:12:36 -07:00
ng_style_spec.ts fix(common): allow null/undefined to be passed to ngStyle input (#47069) 2022-08-09 10:01:49 -07:00
ng_switch_spec.ts feat(common): make the CommonModule directives standalone (#46469) 2022-06-28 12:55:25 -07:00
ng_template_outlet_spec.ts refactor(common): update NgTemplateOutlet to no longer rely on context swapping (#51887) 2023-10-04 08:14:35 -07:00
non_bindable_spec.ts feat(core): update reference and doc to change async to waitAsync. (#37583) 2020-08-03 12:54:13 -07:00