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

can I use this library with the UpgradeAdapter #60

Closed
iwhp opened this issue Mar 15, 2016 · 4 comments
Closed

can I use this library with the UpgradeAdapter #60

iwhp opened this issue Mar 15, 2016 · 4 comments

Comments

@iwhp
Copy link

iwhp commented Mar 15, 2016

I tried to use this library with the angular2 UpgradeAdapter. But I get the following error when I try to add it: TypeError: Cannot read property 'toString' of undefined

I tried the following
upgradeAdapter.addProvider(TRANSLATE_PROVIDERS);

Could someone provide a working sample. Thankx!

@ocombe
Copy link
Collaborator

ocombe commented Mar 15, 2016

I've never used the upgradeAdapter, but I think that you should upgrade TranslateService not TRANSLATE_PROVIDERS (which is an array of parameters)

@iwhp
Copy link
Author

iwhp commented Mar 15, 2016

thankx ocombe! I have tried with TranslateService, unfortunately, same behavior.

I had a look at ng2-translate.js and saw that the following statement is used System.registerDynamic. Components form angular2 use System.register (e.g. http.js). I changed this in ng2-translate.js, but did not solve the issue. I am not sure if this could point somewhere...

@ocombe
Copy link
Collaborator

ocombe commented Mar 15, 2016

Ah you shouldn't use the bundle for that, use the js files from the npm repository (probably src/translate.service.js in your case).

@ocombe
Copy link
Collaborator

ocombe commented Dec 21, 2016

Closing this old issue, let me know if I should reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants