Live data from Hacker News

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

victorbjelkholm.github.io

21–30 of 36 posts

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

#21

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 t…

Thanks for the cooleness mention, always makes me smile! I thought the same thing and started thinking about a port. Then I discovered that is was simpler to just skip the jQuery part and use Javascript only instead.

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 that

3, and the same with this bug

Thanks a lot for checking it out and telling valuable feedback!

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

#25
post #24

Has anyone figure out how to use this when switching between views?

Can you show how you are using the views? Are they directly in the body?

Similiar to the foodme example app (https://github.com/IgorMinar/foodme/blob/master/app/js/app.j...).

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

#27

Wow....what are the odds of this! I literally just came on here to find the site wide progess bar submitted earlier so I could implement it in angular and this shows up! Thanks a lot!

Haha, not so small since this place is filled with smart people!

Thank you for checking it out!

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

#28

Has anyone figure out how to use this when switching between views?

If you take a look at this video: http://www.youtube.com/watch?v=P6KITGRQujQ and associated tutorial, it will give you an example of binding to the RouteChange events for exactly this use case.

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

#30
post #29

This would be easy to recreate without the need of Angular or jQuery...

Yes! Absolutely! Just take the part in the this.$get on line 20 and move it into it's own object and then you won't need Angular anymore.

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.

Post reply on HN