ɵdefineNgModule
is available in flat-file formats (#26403)
When compiling the flat-file version of the `@angular/core` we need to be aware that we cannot rely upon imported names to access the ivy definition functions. The compiler is already clever enough to use local function calls rather than trying to add a namespaced import, but there is a problem if the local name of the function is different to the exported name. This is the case for functions that are not part of the public API, and so are exported under a barred-O private alias. In `@angular/core` the only decorations in use are `@NgModule` and `@Injectable`. There are no directives, components, pipes, etc. Since `defineInjectable` is part of the public API of `@angular/core`, the compiler is able to generate code that references the original non-barred-O version of the function. But the `defineNgModule` is not part of the public API and so the compiler must generate code that refers to it by the private barred-O version of the function. This commit imports and then re-exports this barred-O version of `defineModule` to ensure that the symbol is available in the local scope of the flat-file versions of the `@angular/core` library. PR Close #26403
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%