Show HN: ngProgress - slim, site-wide progressbar for AngularJS, without jQuery
victorbjelkholm.github.io
victorbjelkholm.github.io
Please comment if you see I'm doing something superstrange in the code or if you have any suggestions. I'm eager for your feedback!
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.
1, you can use whatever color you want. Either you call progressbar.color() with an HTML valid color or you use the provider like this:
app.config(function(progressbarProvider){
// Default color is firebrick
progressbarProvider.setColor('firebrick');
// Default height is 2px
progressbarProvider.setHeight('2px');
});
2, I will have to look into that3, and the same with this bug
Thanks a lot for checking it out and telling valuable feedback!
Please let me know what you think would be best.
That way, the progress bar appears moving slower and slower but never actually hits 100%. I think that's better than having the progress bar completely stalled at 95%. See code here: https://github.com/buunguyen/rainbow.js/blob/master/src/rain....
But I will for sure look into using ngProgress with $http and $resource to see if I can make the swapping easier.
Thank you for checking it out!
There does exist a suggestion somewhere in the google groups (that later became a gist/drop in directive) but with the new versions Ng IIRC it broke and threw me off during my tests.
Thanks!
Why it's a provider for Angular is simply because we're using Angular for work and my primary goal is to use this for our application while doing synchronizations and fetching external resources.
So far I've seen straight css, canvas, and css transitions.
But I agree that you should focus on speed first instead of just placing a progressbar because something is slow.
I think it's kinda cool... Not sure if I'd like to see it on every page from now on, though.