-
Notifications
You must be signed in to change notification settings - Fork 12k
Lazy Loading with SSR doesn't seem to work on server #8756
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
Would you be able to put together a minimal reproduction of the issue and put it up on GitHub? Without further information there is not much more that can be done to diagnose the issue. |
Thank you @clydin I tested it with .Net Core Angular CLI based template (aspnet/JavaScriptServices#1288 (comment)) , after enabling SSR everything works fine, but when we convert any module to Lazy Loading module it works fine in browser but on server shows above error. |
Sorry this was due to a configuration issue of asp.net renderer in template. Should be fixed in next version of the template. |
@naveedahmed1 did the fix for this issue made into preview of .net core angular cli template? I am having same error for lazy loading modules. |
Yes it was fixed, for me its working fine. |
@asadsahi the issue was with main.server file generated through template. |
Ahh I see, It was this line:
moved inside createServerRenderer function. Previously it was outside. Its working fine now. Thanks @naveedahmed1 |
Glad to know :) |
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. |
Versions
I am following the steps described in https://github.com/angular/angular-cli/wiki/stories-universal-rendering
but lazy loaded routes doesn't seem to work on server, its showing below error in server log:
The text was updated successfully, but these errors were encountered: