Coder Social home page Coder Social logo

ngslimscroll's Introduction

Angular JS slimscroll (no jQuery required)

ngSlimscroll

AngularJS implementation of original jQuery slimScroll

Originally developed by Piotr Rochala (http://rocha.la) jQuery version

This version also supports horizontal scrolling, please see the example for more information about configuring the horizontal scroll.

Example

Check out the live demo

Install

With bower:

$ bower install ngSlimscroll

With npm

$ npm install ng-slimscroll

Example Configuration (bower)

<!DOCTYPE html>
<html ng-app="app">
<body ng-controller="Ctrl as ctrl">

  <div ng-slimscroll>long content ... </div>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
<script type="text/javascript" src="bower_components/ngSlimscroll/src/js/ngSlimscroll.js"></script>
<script type="text/javascript">
var app = angular.module('app', ['jkuri.slimscroll']);
app.controller('Ctrl', [function() {
	var self = this;
}]);
</script>
</body>
</html>

For more information please see http://demo.jankuri.com/ngSlimscroll/

ngslimscroll's People

Contributors

dongseok0 avatar jkuri avatar lawler avatar matthiassnellings avatar ykushch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ngslimscroll's Issues

you can not set height to 100%

I want to have a scrollbar over the entire length of the screen in my left panel. So I want to set the css height of the scrollbar to 100% this does not work because height expects a number and the code adds + 'px'.
I'm using an adapted version which just does:
element.css({
'overflow': 'hidden',
'width': scope.width,
'height': scope.height,
});

        var wrapper = angular.element('<div></div>');
        wrapper.css({
            'position': 'relative',
            'overflow': 'hidden',
            'width': scope.width,
            'height': scope.height
        });

I think this is a more generic solution because this allows also input like auto (adapt to the height of your children) and 100% (adapt to the height of your parent)...

Node Package Manager

Hi, could you please release this as a node package. I am using browserify to require all my angular modules and it works great but it would help even more if you could release this as a npm package so I wont have to do all kind of trickery to make browserify accept the bower package thanks!

Feature Requests: NG-Repeat + auto-resize, scroll-to, momentum touch scrolling

Jan,
I have always been a huge fan of jq Slimscroll and I appreciate you developing a angular version. Shockingly, the pure angular scroll directives seem to all be incomplete mainly for touch devices. In my case, I really only use a scroll for a chat application.. hints the feature requests.

  1. Support NG-Repeat - I tried this on NG-repeat and it doesn't update
  2. Auto-Resize - basically, if a new DOM node is added or removed, update the H/W
  3. Scroll-to - most chat applications scroll-to bottom. It would be nice to have scroll top|bottom|left|right depending on which scroll you were using... here is a good example: https://github.com/Luegg/angularjs-scroll-glue
  4. Momentum Scroll - I tested this on touch and it was pretty choppy... I am not sure if adding [overflow-y: scroll; -webkit-overflow-scrolling: touch;] would work, but here is a good example of faking this. http://ajoslin.github.io/angular-scrolly/demo/

ngSlimscroll for ng-repeat

Hi, can we use this directive on ng-repeat?
If not can anyone suggest a directive that supports scrolling on ng-repeat, with custom css will be more favorable.

Minimized JS Version

Looking good. It would be better if the minimized version of JS is included. So that faster to load the JS.

Doesn't work on mobile

I have tested a demo page demo.jankuri.com/ngSlimscroll/ using Chrome, Opera and Firefox for Android.

Autohide Scrollbar

Hello, I can't seem to be able to autohide the scrollbar and display on hover only, I can't seem to find anything about this in the docs.

ngSlimscroll not working for dynamic content

When working with static content ngSlimscroll works without any issues, but when using the same for data that would be bound dynamically from the controller, it doesn't work well.

`

`

not working

not working...

<div ng-slimscroll height="500" enabled="true"  >

    <ul class="ui-list" infinite-scroll="next()" infinite-scroll-parent="true" infinite-scroll-distance="0.5" >
        <li class="item" ng-repeat="it in lastNewss">
            <div app-ui-content-theme="last-news" data-content="it"></div>
        </li>
    </ul>
</div>

not scroll showing....
not mousewell up & down

allowPageScrolling

I believe in slimScroll there is an option for allowPageScrolling, so that when user gets to the end of the div scroll the page will begin to scroll.

Is there a way to get this behavior? Or a way to turn off the automatic scrolling of the div from the mouse wheel? (then the user would have to click and drag the scrollbar).

Thank you all for putting this together.

Horz Support

Does it support horzitonal scrolling? If so, does it support both directions?

ngSlimscroll naming.

I propose to change the name. ng prefix is reserved keyword in AngularJS. This is just a proposal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.