Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
feat(core): introduce local scope & make NgModules optional in ivy #27481
Please check if your PR fulfills the following requirements:
What kind of change does this PR introduce?
What is the current behavior?
The templates of a component are compiled based on the NgModule transitive scope, without accepting local component scope.
Issue Number: N/A
What is the new behavior?
The templates of the component could be only compiled using the local component scope, which makes NgModules optional.
Does this PR introduce a breaking change?
In addition to the specific review comments, I've been encouraging the team to take advantage of commit structure a lot more, and to record useful context in commit messages.
For this PR, I would like to see the commits split up into smaller functional pieces, that each implement a specific piece of the solution.
Each of these commits should include not only the main commit title (first line), but a description of what is being implemented and why. I like to begin the description by talking about what state Angular was in beforehand, why it needed to change, and what specific changes the commit makes. For larger multi-commit PRs, I include a "Testing strategy" section in each commit that describes how the change will eventually be tested (usually when the code in the commit is tested as part of a larger operation in a later commit).
Recording this kind of information has a number of benefits:
It's also a good idea (though not enforced by CI) that the tests should pass at each individual commit. This makes things like bisects for identifying performance regressions a lot more workable.