-
Notifications
You must be signed in to change notification settings - Fork 92
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
localize-router not working as expected with Angular Universal: server-side rendering #150
Comments
@meeroslav Any input on this ? |
Hello seems to work if you use children and not load children
|
Hello @ShrikantAdhav , If I undersand, you have forked my repo and replaced every ngx-translate-router by localize-router. Please refer to https://github.com/gilsdav/universal-localize-module-loader ReadMe.
So replace If it doesn't work with new version of localize-router, fill free to open issue on this repo. Edited
|
@ShrikantAdhav I released a new version for Angular 7. Can you try with |
I think it's working now, but somehow the rendered page flickers and "reloads" in the browser. This is just when it's a lazy loaded module. Configuration:
// Actually, the flickering is also with your example https://github.com/gilsdav/angular-universal-localize-router (Angular 7) To hopefully disable the flickering, "initialNavigation" could be set, but this is an other issue #157 here |
I'm submitting a ... (check one with "x")
Description
When i use localize router with Angular Universal: server-side rendering it does not render pages as expected.
Note -
LazyUniversalModuleLoaderProvider
is commented inapp.server.module.ts
file as it throws error.Cases -
Case-1 : When i directly try to load a page with URL (http://localhost:4000/fr/heros/accueil)
- Then first i see server side rendered GotLostPage and then actual page (/fr/heros/accueil) once client side app is loaded.
- GotLostPage is on route - { path: '**', component: GotLostPageComponent }
- When i check the page source it has content of GotLostPage
Case-2 : When i un-commented LazyUniversalModuleLoaderProvider in
app.server.module.ts
file then i got following error on request -Case-3 : It works as expected for root route
🔬 Minimal Reproduction (if applicable)
Here is a repo to reproduce it -
https://github.com/ShrikantAdhav/angular-universal-localize-router
🌍 Your Environment
Angular Version:
Angular CLI: 7.0.6
Node: 8.11.3
OS: win32 x64
Angular: 7.0.4
Localize Router Version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: