Skip to content

Latest commit

 

History

History
46 lines (24 loc) · 1.21 KB

README.md

File metadata and controls

46 lines (24 loc) · 1.21 KB

ng-slim-scroll

This project is AngularJS adaptation of kamlekar's slim-scroll ,

All credits goes to kamlekar. I have just tried to reimplement its work in angularjs.

Demo

demo.html file contains example usage. View demo

Installation

$ bower install ng-slim-scroll

Usage

  1. Require ng-slim-scroll.js in your html file

<script src="ng-slim-scroll.js"></script>

  1. Require base CSS style

a. If you use less import ng-slim-scroll.less in your less file

@import "ng-slim-scroll.less"

b. Else require ng-slim-scroll.css in your html file

<link rel="stylesheet" href="ng-slim-scroll.css">

  1. Add module name 'ng-slim-scroll' to your apps dependencies
var app = angular.module('yourApp', ['ngSlimScroll']);
  1. Add slim-scroll or data-slim-scroll attribute to the element you want to add slim scroll

<div data-slim-scroll data-options="options"> long long long text </div>

If you want to provide options to slim scroll instance, as defined in original project, you can use options data field.