Support for default exports in loadChildren
and loadComponent
callbacks
#46323
Labels
area: router
feature: under consideration
Feature request for which voting has completed and the request is now under consideration
feature
Issue that requests a new feature
Milestone
Which @angular/* package(s) are relevant/related to the feature request?
router
Description
Support for default ES module exports will reduce repetitive code in routes config.
Proposed solution
This feature will not introduce breaking changes, which means that we'll still be able to use
.then((esModule) => esModule.exportedMember)
. Also, there will be a compilation error if an imported module does not have a default export.I will create the PR for this feature if the feature request is accepted. 🙂
Alternatives considered
Using
then((esModule) => esModule.ngModuleOrRoutesOrComponent)
for each lazy loaded module, component, or routes.The text was updated successfully, but these errors were encountered: