Lightweight scrollbar for NG

1,549 views
Skip to first unread message

Georgios Diamantopoulos

unread,
Sep 24, 2013, 6:05:16 AM9/24/13
to ang...@googlegroups.com
Hey all,

With the amount of useful Angular plugins and blog posts out there I am very surprised that there is no directive example for a custom scrollbar.

I've tried using https://github.com/jamesflorentino/nanoScrollerJS but a) it depends on jQuery, not sure if it'd work with jqLite only and b) it fails on a line that does element.content.style because content is undefined. Go figure.

Has anyone taken a stab at making a directive for a custom scrollbar? 

Thanks
Georgios

Grant Rettke

unread,
Sep 24, 2013, 10:07:11 AM9/24/13
to ang...@googlegroups.com
It is pretty common; NG is still cutting edge. The community often
adds more and more.
> --
> 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.



--
Grant Rettke | ACM, AMA, COG, IEEE
gre...@acm.org | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson

Georgios Diamantopoulos

unread,
Sep 26, 2013, 4:48:41 AM9/26/13
to ang...@googlegroups.com
This wasn't a complaint, just surprised - and wondered if anyone has tackled it and wants to share their solution.

Georgios



> Date: Tue, 24 Sep 2013 09:07:11 -0500
> Subject: Re: [AngularJS] Lightweight scrollbar for NG
> From: gre...@acm.org
> To: ang...@googlegroups.com
> You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/kCcExSA3Gtw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.

Grant Rettke

unread,
Sep 28, 2013, 1:12:44 PM9/28/13
to ang...@googlegroups.com
Understood. I was just hoping that you would write a directive that
wraps the scrollbar you mention :).

Georgios Diamantopoulos

unread,
Sep 28, 2013, 1:42:35 PM9/28/13
to ang...@googlegroups.com
I'll have to, but it will be based on a plugin as my CSS/JS knowledge as it relates to the visual side of a page is pretty limited. 

Though I did see a post about a CSS3 custom scrollbar which doesn't need JS plugins to work. 
And I'm kinda agreeing with the guy that that it's ok for people with browsers that dont support CSS3 to see ugly scroll bars :)

I'll try to remember to come back for feedback when I do!

Georgios



> Date: Sat, 28 Sep 2013 12:12:44 -0500

Asaf David

unread,
Jan 17, 2014, 7:01:53 PM1/17/14
to ang...@googlegroups.com
Hi, 
I just released a pure AngularJS scrollbar directive, 
Hope it's still relevant for you. 


Would love to get your feedback!

Georgios Diamantopoulos

unread,
Jan 18, 2014, 8:34:24 AM1/18/14
to ang...@googlegroups.com
That's awesome! We've gone with overflow: auto for now but whenever I get a chance to try this, I'll be sure to send some feedback here or on Git

I did have a quick look at the docs though and for us non-UI-wizards, it would help to give an example of when we should ask the scrollbar to update itself by broadcasting the event
It would also be nice to give the directive a controller which another directive can 'require' and update the scrollbar directly without messing with events.

Georgios



Date: Fri, 17 Jan 2014 16:01:53 -0800
From: asa...@gmail.com
To: ang...@googlegroups.com

Popa Bogdan

unread,
May 9, 2014, 8:24:51 AM5/9/14
to ang...@googlegroups.com
will be nice to have a 'destroy' property
Reply all
Reply to author
Forward
0 new messages