An @NgModule with an 'id' property has its type registered in a global map of modules by id. This happens during compilation of the module. In Ivy, modules are first compiled when the @NgModule decorator executes. In tests, they might be passed again through the TestBed's compiler, resulting in a second compilation and registration. Before this fix, this second registration would cause an error, as the id was previously registered. This commit makes the registration idempotent, so if the same module type is being registered for the same id then no error is thrown. Testing strategy: future commits change the way the TestBed compiles modules, causing tests to become sensitive to this bug if not fixed. PR Close #28033
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%