-
-
Notifications
You must be signed in to change notification settings - Fork 15
use HttpBackend instead of HttpClient #18
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
Conversation
As commented [here](ngx-translate/core#1347), if the `HttpClient` get intercepted, then it will cause an error & crash. Using the `httpBackend` safely remove this problem with no negative impact. As soon as this pull request get accepted, I'll update the documentation
|
Hi, thanks for creating this PR. I am just wondering if somebody is using http interceptors and wants them to intercept the translation calls. What do you think? |
|
I just realized that this would be a breaking change also because you will have to give the translation factory a http backend instead http client and this would confuse everybody who is upgrading. I think we should add a warning in the readme about interceptors instead with this code suggestion: |
|
@denniske Maybe bumping a major release & mentioning it at the top with a big warning that it have to be change. Also, if you wish I can add a new Also, if you let me I'll be glad to refactor a bit the code :) What do you think ? Another Idea I had was to make the suffix being If this is ok for you, I'll close this merge request and do a big one :). |
|
I like the idea with the default suffix. The problem is I do not have much time for maintaining this repo and as such want to avoid breaking changes and the complications that arise with them. If you can take over maintaining the project I can give you access to the repo and the npm repo. |
|
@denniske I'll be glad to help you with this one, since actually I have to maintain a fork of it, which do not make a lot of sense. Closing this merge request for the moment, We'll do that work on Sunday ev. |
|
@denniske I went through the codebase & change it to the latest standard, I also enhanced it a little bit. Changes
QuestionShall I completely remove the |
Yes sounds good |
|
@denniske Done, please review the code, if it fits your standard |
|
Looks good. I have merged the PR. Please delete your fork so I can transfer the repo to you. |
|
@denniske Nice.
Would you wish to push over npm a prerelease, that I can test it out if everything worked like expected ? |
|
I have requested the repo transfer. You should get an email. Yes, give me your npmjs username so I can invite you as maintainer for the package. Then you can do a prerelease. |
|
@denniske Saw that and accepted, thx. This is my user name |
|
Invite is on the way |
|
Let me know if you got access, so I can remove myself as maintainer there. |
|
@denniske I got the access, everything seems ok. |
|
I haven't used this library myself since years so I will remove myself as maintainer. Thank you for taking over 👍 |
|
@denniske Ok no problem, then thx an have a nice day |
As commented here, if the
HttpClientget intercepted, then it will cause an error & crash. Using thehttpBackendsafely remove this problem with no negative impact.As soon as this pull request get accepted, I'll update the documentation