angular/packages/core/src/render3/view
Kristiyan Kostadinov 886cf6c452 fix(core): unable to inject viewProviders when host directive with providers is present
When registering providers, the DI system assumes that `viewProviders` are registered before plain `providers`. This was reinforced by components always being first in the array of directive matches, only one component being allowed per node and the fact that only components can have `viewProviders`.

This breaks down if there are host directives with `providers` on the component, because they'll execute earlier, throwing off the order of operations.

These changes fix the issue by separating out the resolvers for `viewProviders` and plain `providers` and explicitly running the component's `viewProviders` resolver before any others. This also has the benefit of not attempting to resolve `viewProviders` for directives which are guaranteed not to have them.

Fixes #65724.
2025-12-03 15:09:48 +01:00
..
construction.ts refactor(core): drop unused ngDevMode metrics (#60686) 2025-04-02 14:17:10 +00:00
container.ts refactor(core): move LContainer manipulation logic to its own file (#59856) 2025-02-18 15:41:42 +00:00
directive_outputs.ts fix(core): enable stashing only when withEventReplay() is invoked (#61077) 2025-05-14 10:35:57 -07:00
directives.ts fix(core): unable to inject viewProviders when host directive with providers is present 2025-12-03 15:09:48 +01:00
elements.ts refactor(core): properly handle local references in DOM-only instructions (#62096) 2025-06-23 14:24:09 +02:00
listeners.ts refactor(core): export profile event as enum and move profile_types.ts and framework to shared devtools folder 2025-11-19 15:22:49 -08:00