0.2.2 • Published 7 years ago

ng-slim-scroll v0.2.2

Weekly downloads
97
License
MIT
Repository
github
Last release
7 years ago

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">

  2. 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.