ngx-translate-router
ngx-translate-router copied to clipboard
Redirecting to en/en when empty
I am using it with single-spa (micro frontend architecture). I have a single-spa root hosting a navbar and a mainapp.
Everything is working correctly when I navigate to localhost:4200/en or localhost:4200/fr (both app appear and translated).
But when I navigate to localhost:4200/ it automatically redirect to localhost:4200/en/en (or fr/fr depending on the last one used).
Here are my versions :
angular : 14.2.0 ngx-translate-router : 5.1.1 ngx-translate-router-http-loader : 2.0.0
if anyone has leads to follow, I can give code samples. Thanks
I have similar, but not the same problem. When I visit a website without any path, e.g.: localhost:4200, I get infinite redirect loop, to the last language page, for example: localhost:4200/en. And the page does not load. If I visit a page, providing the language, e.g.: localhost:4200/fr, I get redirected to the localhost:4200/fr/fr page, and it loads. The routes are translated normally: e.g. localhost:4200/en/auth. do not doulbes the langugage, but the navigation the route does not work. no errors in console.
I have fixed my problem, by removing my own I18nGuard from the routes... But now I have a problem with child routes in standalone app. the routes are not parsed/translated correctly, and on the translated languages the routed page is not loaded, like not found. The urls are generated correctly.