ng-scrollbars
ng-scrollbars copied to clipboard
using in body / whole page?
Hello !
Nice plugin, but I would like to use it for the whole page, so body or div below body to scroll the whole page. Is there a way to realize that. I've got always height: 0px when I try to realize that.
Thank you!
Hi Fintasys, yes that should be possible, I'll see if I can come up with a demo
Hey iominh,
that would be awesome. Thank you!
Heyo, see if the following demo helps (http://iominh.github.io/ng-scrollbars/fullpage.html). The source should hopefully be straightforward but let me know if you have any questions/issues
Actually I just noticed on my iPad that performance is very bad for that demo (previously looked on my desktop chrome browser).
Here's some further research:
- There appears to be performance issues in Malihu 3.1.3 itself (https://github.com/malihu/malihu-custom-scrollbar-plugin/issues/224). See http://iominh.github.io/ng-scrollbars/examples/fullpage/jquery_perf.html
- The jQuery version works fine http://manos.malihu.gr/repository/custom-scrollbar/demo/examples/full_page_demo.html, http://iominh.github.io/ng-scrollbars/examples/fullpage/jquery.html
I currently don't have enough time to really dive deep into this but I've always wanted to rewrite this directive to be a pure Angular without any dependencies, so this may require such a change if it means that Malihu's library needs to be modified. For inspiration, I may need to look into http://malte-wessel.github.io/react-custom-scrollbars/ to see how they're able to get 60fps
Hey! Is there any work towards making the lib dependency free? I would really like to use it, but I really don't want to include jquery just for a scrollbar, it seems to be an overhead for me.
Hi @orangesoup, unfortunately at the moment no, as it's quite a bit of work and one of its Malihu's advantages is lots of cross-browser support, so I believe it leverages jquery quite a bit. I don't have the time at the moment as I currently use React and Angular2 will be non-beta at some point.
I totally agree that it's not a great idea to have jQuery when using Angular if possible. For this reason, you might want to check out one of the other angular libraries (https://github.com/iominh/ng-scrollbars/tree/0.0.10#other-options) like https://github.com/asafdav/ng-scrollbar perhaps. You could always just port what you need and migrate code from Malihu or ng-scrollbars.
Also, I'm totally open to handing over this repo to another maintainer or contributions if anyone would like to take on this effort :)
Thanks @iominh! Sadly since there is no Angular Material for Angular 2 at the moment, I'm kinda stuck with Angular 1.x. I might just stick with the standard scrollbar then, since I'm not sure it worth the effort. :)
Yep definitely. I initially started this project because I had to support many browsers like Firefox and pure CSS by itself wouldn't work. Maybe someday that might be possible. Anyway thanks for considering ng-scrollbars and best of luck!