ngProgress - Loading indicator for AngularJS applications

764 views
Skip to first unread message

Victor Bjelkholm

unread,
Aug 21, 2013, 9:50:49 AM8/21/13
to ang...@googlegroups.com
Hello there everyone!

I'm kind of new in the Angular world but I've got a lot of benefits from using Angular so now it's my time to contribute back.

I saw NProgress ( a slim loading indicator inspired by Youtube and Medium's loadingbars ricostacruz.com/nprogress/ ) and was inspired
of creating a Angular provider for the same thing but without the jQuery dependency and a bit easier to use.

So if you fetch external resources, this is the provider for you.

The Github repository is here: https://github.com/VictorBjelkholm/ngProgress

Please tell me what you think and shout at me if I'm doing something supercrazy in the code ( https://github.com/VictorBjelkholm/ngProgress/blob/master/ngProgress.js is the sourcecode for the provider )

Phil DeJarnett

unread,
Aug 21, 2013, 5:17:47 PM8/21/13
to ang...@googlegroups.com
It looks great, and works pretty well. I actually had the same idea to recreate NProgress without the jQuery dependency.

My thoughts:

  • The automatic progress increase is much faster than the one from NProgress. So much so, that it's not really useful.  NProgress updates just 2% (0.02) every 800ms, so it takes around 40 seconds to completely fill the bar when there's no feedback. I'd definitely slow it down.
  • I also think you should separate out all the CSS. It would make much more sense to include a single, static CSS file with the basic layout, animation setup, size, and color settings. That not only reduces the JS size quite a bit, but it enables separation of concerns between styling and functionality.
  • When setting the percentage, it stops the automatic progress. I don't know if that makes sense or not. I slightly prefer the trickle to continue unless explicitly stopped.

Overall, great job!

- Phil DeJarnett

Victor Bjelkholm wrote:
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages