angular/packages/core
Kristiyan Kostadinov 4ef11c987d fix(core): resolve forward-referenced host directives during directive matching (#58492)
When the compiler generates the `HostDirectivesFeature`, it generates either an eager call (`ɵɵHostDirectivesFeature([])`) or a lazy call (`ɵɵHostDirectivesFeature(() => [])`. The lazy call is necessary when there are forward references within the `hostDirectives` array. Currently we resolve the lazy variant when the component definition is created which has been enough for most cases, however if the host is injected by one of its host directives, we can run into a reference error because DI is synchronous and the host's class hasn't been defined yet.

These changes resolve the issue by pushing the lazy resolution later during directive matching when all classes are guanrateed to exist.

Fixes #58485.

PR Close #58492
2024-11-04 16:17:23 +01:00
..
global refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
primitives refactor(core): allow passing passive option to addEvent (#58316) 2024-10-24 17:49:26 -07:00
reference-manifests build: add target to generate api manifest (#52472) 2023-11-02 11:00:59 -07:00
rxjs-interop fix(core): avoid breaking change with apps using rxjs 6.x (#58341) 2024-10-24 16:17:47 -07:00
schematics refactor(migrations): useFactory in provide-initializer migration (#58493) 2024-11-04 15:45:50 +01:00
src fix(core): resolve forward-referenced host directives during directive matching (#58492) 2024-11-04 16:17:23 +01:00
test fix(core): resolve forward-referenced host directives during directive matching (#58492) 2024-11-04 16:17:23 +01:00
testing refactor(core): Setup constant for standalone default value (#58175) 2024-10-14 16:01:41 +00:00
BUILD.bazel refactor(platform-server): Add an ssr benchmark setup. (#57647) 2024-10-04 10:45:22 -07:00
index.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
package.json build: update zone.js peer dependency for core package to 0.15.0 (#57431) 2024-08-21 13:17:52 -07:00
PACKAGE.md docs: add package doc files (#26047) 2018-10-05 15:42:14 -07:00
public_api.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00