-
Notifications
You must be signed in to change notification settings - Fork 93
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
Lazy loaded component is not bootstrapping #158
Comments
I was able to solve this issue and seems like this is not working with initialNavigation: 'enabled' on Router. And this is needed to prevent flickering with SSR. Also i have an error on SSR: Error: Cannot find module './components/home/home.module.ngfactory' - how this can be solved? |
@vytautas-pranskunas- I solved this issue. Our error was on the imports order on app-routing.module. The Router must be the first import, before LocalizeRouter @NgModule({
imports: [
RouterModule.forRoot(appRoutes), <---------------- FIRST
LocalizeRouterModule.forRoot(appRoutes)
],
exports: [
RouterModule, <---------------- FIRST
LocalizeRouterModule
]
}) I don't know exactly if it's relevant on the forChild imports and exports but make sense follow the same order. NOTE: We have SSR implemented |
@rafa-as We have import and export for parent app-routing.module, but it's doesn't change anything. Doesn't work. |
@vytautas-pranskunas- It's an SSR error. Do you use |
I am trying to do routes localization however home component is not bootstrapping on hard refresh also if i any route and do hard refresh get an error - No matches found. But if i click on any link in app.component that uses translated urls they are working. I have clones DEMO project and made home also lazy loaded and it works fine. Can someone help to understand why this might happen?
I have posted this question on Stackoverflow but there is no localize-router tag so I am re-posting it here
https://stackoverflow.com/questions/54672738/localize-router-not-bootstrapping-component-on-refresh
The text was updated successfully, but these errors were encountered: