angular/packages/core/src/render3/features
Andrew Kushnir 031b599a55 fix(core): ensure that standalone components get correct injector instances (#50954)
Prior to this change, we've used `componentDef.id` as a key in a Map that acts as a cache to avoid re-creating injector instances for standalone components. In v16, the logic that generates the id has changed from an auto-incremental to a generation based on metadata. If multiple components have similar metadata, their ids might overlap.

This commit updates the logic to stop using `componentDef.id` as a key and instead, use the `componentDef` itself. This would ensure that we always have a correct instance of an injector associated with a standalone component instance.

Resolves #50724.

PR Close #50954
2023-07-10 07:07:44 -07:00
..
copy_definition_feature.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
host_directives_feature.ts fix(core): host directives incorrectly validating aliased bindings (#50364) 2023-05-19 15:09:48 +00:00
inherit_definition_feature.ts feat(core): add ability to transform input values (#50420) 2023-05-30 13:01:13 -07:00
input_transforms_feature.ts feat(core): add ability to transform input values (#50420) 2023-05-30 13:01:13 -07:00
ng_onchanges_feature.ts refactor(core): handle ngOnChanges in host directives (#47597) 2022-10-03 10:07:51 -07:00
providers_feature.ts refactor(core): Add injector debug information to LViewDebug (#38707) 2020-09-28 16:15:59 -04:00
standalone_feature.ts fix(core): ensure that standalone components get correct injector instances (#50954) 2023-07-10 07:07:44 -07:00