mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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. |
||
|---|---|---|
| .. | ||
| src | ||
| BUILD.bazel | ||
| index.ts | ||
| PACKAGE.md | ||
| public_api.ts | ||