-
Notifications
You must be signed in to change notification settings - Fork 91
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
Question: Usage with @angular/http #15
Comments
I plan to make small changes to support it out of the box. |
@akserg can you provide hint on how to make this working , i will fork and do . :) |
@akserg any news on this? let me know if we can contribute any help on this. |
I use this decorator. It's bad code but it works for now. Feel free to use/modify it for your needs.
} |
This will be a good implementation |
@akserg Any milestone for this? Would be a great plugin if it can work like: automatic loading bar |
What if we write custom http client and start loading bar there (for every get,post,put, delete requests). Left to invent where finish loading bar. |
Anyone have any ideas how to do it? I can do it, but i don't know where to start :( |
I already implemented, you just need to override the |
Where you publish ? |
@aitboudad Very nice, just added and it work perfectly. It'll be nice to added some properties to the component for colour and height. Good work!! |
ok can you create a new issue ? |
Another option is to simply centralize your http calls into a single data service. I've done something like this;
In my central error handler, I complete the loading bar as well, but change the color to red first. |
@finleysg Problem with your implementation is, currently loading bar completes automatically if the request take a long time, lets say 2 mins. The browser might have internal timeout, but that's browser dependent. We as developers should not be dependent on the browser settings. We should have control over this instead Try this in the demo |
@thekalinga you're exactly right, but I'm willing to live with that for now. It's on my punch list to fix that, but not a priority. |
Also when multiple simultaneous requests are made, the bar gets confused about start and finish. Interesting would be to check if the bar is already running / has open requests. |
Also the new HttpClient: |
Hi,
thank you for this component. How would I use it with @angular/http?
In angular 1 I use this: https://chieffancypants.github.io/angular-loading-bar/
The text was updated successfully, but these errors were encountered: