-
Notifications
You must be signed in to change notification settings - Fork 12k
Routes defined by loadChildren with a factory function do not get compiled by AOT #8429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
related to #4192. This one is slightly difference since we are loading the modules from a library and can't use lazy load paths in the module |
The AOT/JIT module loading decision of the string form of |
I'm having the exact same problem. |
Are you still able to reproduce this issue with the latest version? |
@mgechev i will try it again. We found another approach that worked for our case but its a concession as we create another module in the app that is lazy and then it imports the library module and then loads its children eagerly. The issue is related to the general problem of distrubution of work in a monolithic spa. We want to be able to distribute page development across teams without having them all work in the same code base. The ability to lazy load modules directly from node modules and the ability to lazy load sub routes from those libraries would really help. |
Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out our submission guidelines to understand why we can't act on issues that are lacking important information. If the problem persists, please file a new issue and ensure you provide all of the required information when filling out the issue template. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)[x ] bug report
Versions.
Angular CLI: 1.5.0
Node: 6.9.1
OS: darwin x64
Repro steps.
When compiling an app AOT, modules that are loaded using a function for loadChildren do not get compiled properly. We need this functionality to properly load routes from modules. We cannot use the lazy load string syntax because these modules exist as packages in the node_module folders and lazy loaded routes inside of a node module package are not supported by the CLI yet.
The log given by the failure.
Desired functionality.
This should properly compile the modules returned by the factory function.
The text was updated successfully, but these errors were encountered: