Closed robisim74 closed 1 year ago
@nickroberts Your app built with nx has a difference: use initialNavigation: 'enabled'
in the router: if I remove it, the app works (also the reloading of the lazy module).
However, it should work also with initial navigation, so there must be something else in the app, but it doesn't depend on nx anyway.
Ah! That's it! At least as to why the Nx one doesn't work.I added that to the ng version, and it broke, too. Thanks for the insight! Might need to look into why that option isn't working for angular-l10n.
Thanks! Also, thanks for migrating this to a separate issue. I guess you can either close this, or if you want to investigate why that option is breaking the library, that's cool.
Keep up the great work!
Looks like that property is required for SSR to work.
Looks like the router has its own APP_INITIALIZER, as well.
https://github.com/angular/angular/issues/36263#issuecomment-610671572
The strange thing is that in the sample app of this project, the option works (but without L10nRouting
).
About SSR, never used that option.
However I'll continue to investigate, and let you know here.
Greetings
Yea, I haven't used Angular Universal (SSR), either, but would love to be able to use that option if we need to. I'll let you know if I find out anything else. Thanks!
@nickroberts I fixed initialNavigation
in the latest version: https://github.com/robisim74/angular-l10n/releases/tag/v9.2.0
Greetings
@robisim74 It looks like this is back with version 10.0.1. 10.0.0 works, but after updating, and lazy loading translations, it no longer loads the lazy loaded translations ifinitialNavigation
is enabled.
@nickroberts Thanks for reporting the problem (again). Fixed in v10.0.2
Looks good! Thanks!
Closed due to inactivity
I am getting a weird error, as well, when lazy loading translations from a project created with nx.
What's weird, is that it works fine with the exact same code when I just create a project with the Angular CLI.
Looks like there might be some issues with running an Nx project in StackBlitz. Here is a pristine project that was generated with nx on StackBlitz.
If this can't be figured out, I'm going to move away from using Nx. I like it, but I think I can get most of what I want done with just the Angular CLI (multiple projects / libraries).
Originally posted by @nickroberts in https://github.com/robisim74/angular-l10n/issues/295#issuecomment-612272480