Closed arminh closed 4 years ago
according to the feedback on stackoverflow, this still occurs on the 1.4 final.
The problem is caused by the Angular Universal which doesn't allow for relative URLs in SSR (in HttpClient
). See angular's issues:
Pass to the loadPath
the an absolute path containing the host and the path.
Only in SSR: identify the server request's host. Then prepend this host to the relative path of loadPath
. We should ensure that it's working also when having a reverse proxy (on a different host).
The same as here: https://github.com/SAP/cloud-commerce-spartacus-storefront/issues/6030#issuecomment-573036540 Please make sure to disable Javascript in your browser to see only the result of the SSR.
Expected: translations are displayed on http://localhost:4200/electronics-spa/en/USD/product/300938/Photosmart%20E317%20Digital%20Camera (i.e. Add to cart button)
Environment Details
Steps to Reproduce
Observed Results
The translations are not loaded by the Node application:
Expected Results
Translations should be loaded from JSON files also on initial server-side rendered page.