Skip to content
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

JSON file with translation is loaded twice #26

Closed
mrzepinski opened this issue Feb 15, 2017 · 2 comments
Closed

JSON file with translation is loaded twice #26

mrzepinski opened this issue Feb 15, 2017 · 2 comments

Comments

@mrzepinski
Copy link

With localize-router I see in my Network tab (Chrome) that the JSON file with current language translations is loaded twice.

"@angular/cli": "1.0.0-beta.31"
"@angular/compiler-cli": ">=4.0.0-beta <5.0.0"
"@angular/common": ">=4.0.0-beta <5.0.0"
"@angular/compiler": ">=4.0.0-beta <5.0.0"
"@angular/core": ">=4.0.0-beta <5.0.0"
"@angular/http": ">=4.0.0-beta <5.0.0"
"@angular/platform-browser": ">=4.0.0-beta <5.0.0"
"@angular/platform-browser-dynamic": ">=4.0.0-beta <5.0.0"
"@angular/router": ">=4.0.0-beta <5.0.0"
"ng2-translate": "5.0.0"
"localize-router": "0.6.2"

@meeroslav
Copy link
Collaborator

I will look into it, thanks

@meeroslav
Copy link
Collaborator

@mrzepinski This was a know issue in ng2-translate now known as ngx-translate. You can find more details here: ngx-translate/core#397 (comment). It will be resolved once I upgrade to latest version.

ocombe pushed a commit to ngx-translate/core that referenced this issue Mar 23, 2017
This stops multiple requests being made for the same lang file. It will now return the same observable when making duplicate requests for the same language.

Fixes #397
Fixes #432 
Fixes #447
Fixes Greentube/localize-router#26
Fixes #462
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants