Closed udos86 closed 1 year ago
Let keep tracking i18n support in https://github.com/angular/angular-cli/issues/25726
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
π Bug report
What modules are related to this issue?
Is this a regression?
No ### Description When using new @angular/localize package and building multiple localizations via --localize flag the internal express view caching causes the app to crash when switching between different languages at runtime. Due to the changing of base href the server incorrectly responds with the initially cached bundle. This has already been reported to and discussed with @manfredsteyer ## π¬ Minimal ReproductionTo reproduce this issue please clone this minimal GitHub repository: https://github.com/udos86/ng9-localize-ssr and follow these steps:
npm run build:ssr
npm run serve:ssr
The application crashes due to the cached English localization being send to the browser instead of the requested German one.
server.ts
by removing comment in line 39:server.disable('view cache');
npm run build:ssr
npm run serve:ssr
Everything works fine now!
π₯ Exception or Error
Due to the wrong base href the Angular router throws because it's not able to resolve the client-side routes anymore:
π Your Environment