The compiler needs to track the dependencies of a component, including any NgModules which happen to be present in a component's scope. If an upstream NgModule changes, any downstream components need to have their templates re-compiled and re-typechecked. Previously, the compiler handled this well for the A -> B -> C case where module A imports module B which re-exports module C. However, it fell apart in the A -> B -> C -> D case, because previously tracking focused on changes to components/directives in the scope, and not NgModules specifically. This commit introduces logic to track which NgModules contributed to a given scope, and treat them as dependencies of any components within. This logic also contains a bug, which is intentional for now. It purposefully does not track transitive dependencies of the NgModules which contribute to a scope. If it did, using the current dependency system, this would treat all components and directives (even those not exported into the scope) as dependencies, causing a major performance bottleneck. Only those dependencies which contributed to the module's export scope should be considered, but the current system is incapable of making this distinction. This will be fixed at a later date. PR Close #36211
Angular
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages.
Quickstart
Changelog
Learn about the latest improvements.
Want to help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.
Description
Languages
TypeScript
68.6%
HTML
12.8%
JavaScript
8.4%
Pug
7%
Starlark
1.4%
Other
1.7%