Live data from Hacker News

Show HN: ngProgress - slim, site-wide progressbar for AngularJS, without jQuery

victorbjelkholm.github.io

11–20 of 36 posts

Re: Show HN: ngProgress - slim, site-wide progressbar for AngularJS, without jQuery

#11

Would be good to have a real-world example, like a progress for $http, or loading data... I am trying to swap angular-app's spinner with this, but it works with $http.pendingRequests (the less, the more advanced the progress should be).

Hmm, I will work on some realworld examples, for sure. Mainly it's for faking the progress so the user can see something instead of seeing nothing which means you call progressbar.start() before the request and progressbar.complete() when the request is done.

But I will for sure look into using ngProgress with $http and $resource to see if I can make the swapping easier.

Re: Show HN: ngProgress - slim, site-wide progressbar for AngularJS, without jQuery

#12
post #10

Oh my God. I don't have the vocabulary to tell you how much this sickens me. You don't have to do something just because Google does it. Focus on speed instead of shitty non-features that lambda users will find misleading.

Sickens?

I think it's kinda cool... Not sure if I'd like to see it on every page from now on, though.

Re: Show HN: ngProgress - slim, site-wide progressbar for AngularJS, without jQuery

#13
post #10

Oh my God. I don't have the vocabulary to tell you how much this sickens me. You don't have to do something just because Google does it. Focus on speed instead of shitty non-features that lambda users will find misleading.

No, thank god I don't copy everything Google does. Of course you should focus on speed when doing some external resources, you sometime don't have the means to control how fast something is.

But I agree that you should focus on speed first instead of just placing a progressbar because something is slow.

Re: Show HN: ngProgress - slim, site-wide progressbar for AngularJS, without jQuery

#15
post #14

One difference from yesterday's example is that it will get to 100% without 'complete' firing.

Yeah, I'm not sure that the progressbar should disapear just because the width is 100% because the loading still can be unfinished. Therefore you should always call progressbar.complete() after the loading is done.

Please let me know what you think would be best.

Re: Show HN: ngProgress - slim, site-wide progressbar for AngularJS, without jQuery

#16
post #15
post #14

One difference from yesterday's example is that it will get to 100% without 'complete' firing.

Yeah, I'm not sure that the progressbar should disapear just because the width is 100% because the loading still can be unfinished. Therefore you should always call progressbar.complete() after the loading is done. Please let me know what you think would be best.

I think you missed a subtlety of nprogress, where it never fills the last 10 (or so) pixels unless complete is fired, presumably so that it doesn't make you think loading is finished until it's really, really finished.

Re: Show HN: ngProgress - slim, site-wide progressbar for AngularJS, without jQuery

#17
post #10

Oh my God. I don't have the vocabulary to tell you how much this sickens me. You don't have to do something just because Google does it. Focus on speed instead of shitty non-features that lambda users will find misleading.

Sickens? I think it's kinda cool... Not sure if I'd like to see it on every page from now on, though.

Agree that it shouldn't be used on every website. I think the use case would be when you are doing heavy processing or waiting for external resources. Not like Medium is using it, when loading a new article with only text.

Re: Show HN: ngProgress - slim, site-wide progressbar for AngularJS, without jQuery

#18
post #16
post #15

Earlier quoted context omitted.

Yeah, I'm not sure that the progressbar should disapear just because the width is 100% because the loading still can be unfinished. Therefore you should always call progressbar.complete() after the loading is done. Please let me know what you think would be best.

I think you missed a subtlety of nprogress, where it never fills the last 10 (or so) pixels unless complete is fired, presumably so that it doesn't make you think loading is finished until it's really, really finished.

Oh, yes, I totally missed that and that seems very reasonable actually. I've now changed (commit 34e3c16 http://git.io/4MeJNg) so the start-method will stop at 95% instead of stopping at 100%.

Re: Show HN: ngProgress - slim, site-wide progressbar for AngularJS, without jQuery

#19
Wow, this is cool. The first thing I thought when I saw http://ricostacruz.com/nprogress/ (submitted earlier) was how much effort to port/implement it to/in AngularJS. And you did it!

Sorry for nitpicking: (1) I think the color is too strong, (2) At one time (I don't know what I did), the progress bar went 50% but centered instead of left-aligned (but still on top), unfortunately I can't reproduce it, and (3) While trying to reproduce the bug, I encounter another bug where it won't stop if I click "Start progressbar" repeatedly.

Post reply on HN