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 we have angular 5 support? #2

Open
harryy2510 opened this issue Dec 2, 2017 · 13 comments
Open

Can we have angular 5 support? #2

harryy2510 opened this issue Dec 2, 2017 · 13 comments

Comments

@harryy2510
Copy link

Hi,
Since http is deprecated and now it is httpClient, Can we have support for angular 5?

@jonsamwell
Copy link
Owner

@harryy2510 yeah I have been meaning to do this since Angular 5 was release I just haven't had time. The architecture of the new HttpClient is fairly different to that of the old Http so it'll need some thinking about. I will endeavor to do it in the next few weeks.

@Evgen14
Copy link

Evgen14 commented Dec 21, 2017

Hi, when you can expect support for angular 5?

@jonsamwell
Copy link
Owner

@Evgen14 Sorry I have been so busy lately. The current version (v1.10) works with Angular 5 albeit with the now depricated http module. I need to investigate how to do this with the new HttpClient as I think it might be best to do it via an interceptor. Any ideas welcome.

@harryy2510
Copy link
Author

I've tried porting your batcher to angular6. Do you mind looking at it once and adding a few features?

@Tiberriver256
Copy link

I would be excited to see that!

@jonsamwell
Copy link
Owner

@harryy2510 @Tiberriver256 I do need to get around to porting to Angular 6. I have some idea around just using an interceptor now. @harryy2510 I would be very interested to see your ideas.

@harryy2510
Copy link
Author

Here's the link.

Stackblitz

@srikrsna
Copy link

batcher.zip

Here's the Batcher Using Angular Interceptors with customisable Options.

@idrisfl
Copy link

idrisfl commented Aug 24, 2018

I am looking forward to Angular 5 support for this

@timbyng
Copy link

timbyng commented Aug 30, 2018

@srikrsna @harryy2510 Thanks for providing your Angular 6 solutions. @srikrsna, do you have an example on how the BatcherConfigService can be used?

@srikrsna
Copy link

@timby You can extend the class and override any and all of the methods to create a custom configuration. Once extended you can provide your extension through DI using Angular's useClass semantics.

@JosePFs
Copy link

JosePFs commented Dec 5, 2018

Thanks @srikrsna @harryy2510 @timby
I've modified interceptor to work with this symfony bundle:
https://github.com/IdeasoftLabs/http-batch-bundle
that implements this draft https://tools.ietf.org/id/draft-snell-http-batch-00.html

Working in Angular 7,
making requests array with forkjoin (tested)
batch.zip

Thanks and regards

@ytilis
Copy link

ytilis commented Oct 2, 2019

I've made a new package based heavily on the work by @srikrsna

You can find it here: https://www.npmjs.com/package/ngx-batch-requests

It's configurable via a provider token in AppModule, and I cleaned up and fixed some issues I found in the previous solutions posted in this thread.

Let me know if anyone wants any additional configurations, you spot any bugs, etc.

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

9 participants