ng-infinite-scroll
Advanced tools
Comparing version 0.2.0 to 1.0.0
@@ -1,2 +0,2 @@ | ||
/* ng-infinite-scroll - v0.1.0 - 2013-02-21 */ | ||
/* ng-infinite-scroll - v1.0.0 - 2013-02-23 */ | ||
var mod; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/* ng-infinite-scroll - v0.1.0 - 2013-02-21 */ | ||
/* ng-infinite-scroll - v1.0.0 - 2013-02-23 */ | ||
var mod;mod=angular.module("infinite-scroll",[]),mod.directive("infiniteScroll",["$rootScope","$window","$timeout",function(i,n,e){return{link:function(t,l,o){var r,c,f,a;return n=angular.element(n),f=0,null!=o.infiniteScrollDistance&&t.$watch(o.infiniteScrollDistance,function(i){return f=parseInt(i,10)}),a=!0,r=!1,null!=o.infiniteScrollDisabled&&t.$watch(o.infiniteScrollDisabled,function(i){return a=!i,a&&r?(r=!1,c()):void 0}),c=function(){var e,c,u,d;return d=n.height()+n.scrollTop(),e=l.offset().top+l.height(),c=e-d,u=n.height()*f>=c,u&&a?i.$$phase?t.$eval(o.infiniteScroll):t.$apply(o.infiniteScroll):u?r=!0:void 0},n.on("scroll",c),t.$on("$destroy",function(){return n.off("scroll",c)}),e(function(){return o.infiniteScrollImmediateCheck?t.$eval(o.infiniteScrollImmediateCheck)?c():void 0:c()},0)}}}]); |
{ | ||
"name": "ng-infinite-scroll", | ||
"version": "0.2.0", | ||
"version": "1.0.0", | ||
"description": "Infinite scrolling for AngularJS", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -5,12 +5,54 @@ ![logo](http://binarymuse.github.com/ngInfiniteScroll/images/logo-resized.png) | ||
ngInfiniteScroll is still under development. Watch this space! | ||
ngInfiniteScroll is a directive for [AngularJS](http://angularjs.org/) to evaluate an expression when the bottom of the directive's element approaches the bottom of the browser window, which can be used to implement infinite scrolling. | ||
--- | ||
Demo | ||
---- | ||
Check out a running demo [at the ngInfiniteScroll web site](http://binarymuse.github.com/ngInfiniteScroll/demo.html). | ||
Version Numbers | ||
--------------- | ||
ngInfinite Scroll follows [semantic versioning](http://semver.org/) and uses the following versioning scheme: | ||
* Versions starting with 0 (e.g. 0.1.0, 0.2.0, etc.) are for initial development, and the API is not stable | ||
* Versions with an even minor version (1.0.0, 1.4.0, 2.2.0, etc.) are stable releases | ||
* Versions with an odd minor version (1.1.0, 1.3.0, 2.1.0, etc.) are development releases | ||
The [download page](http://binarymuse.github.com/ngInfiniteScroll/#download) allows you to pick among various versions and specify which releases are stable (not including pre-release builds). | ||
Getting Started | ||
--------------- | ||
* Download ngInfiniteScroll from [the download page on the ngInfiniteScroll web site](http://binarymuse.github.com/ngInfiniteScroll/#download) | ||
* Include the script tag on your page | ||
<script type='text/javascript' src='path/to/ng-infinite-scroll.min.js'></script> | ||
* Ensure that your application module specifies `infinite-scroll` as a dependency: | ||
angular.module('myApplication', ['infinite-scroll']); | ||
* Use the directive by specifying an `infinite-scroll` attribute on an element. | ||
<div infinite-scroll="myPagingFunction()" infinite-scroll-distance="3"></div> | ||
Note that neither the module nor the directive use the `ng` prefix, as that prefix is reserved for the core Angular module. | ||
Detailed Documentation | ||
---------------------- | ||
ngInfiniteScroll accepts several attributes to customize the behavior of the directive; detailed instructions can be found [on the ngInfiniteScroll web site](http://binarymuse.github.com/ngInfiniteScroll/documentation.html). | ||
License | ||
------- | ||
ngInfiniteScroll is licensed under the MIT license. See the LICENSE file for more details. | ||
Testing | ||
------- | ||
ngInfiniteScroll uses Testacular for its unit tests. Note that you will need [PhantomJS](http://phantomjs.org/) on your path, and the `grunt-cli` npm package installed globally if you wish to use grunt. | ||
ngInfiniteScroll uses Testacular for its unit tests. Note that you will need [PhantomJS](http://phantomjs.org/) on your path, and the `grunt-cli` npm package installed globally if you wish to use grunt (`npm install -g grunt-cli`). Then, install the dependencies with `npm install`. | ||
* `grunt test` - continually watch for changes and run tests in PhantomJS and Chrome | ||
* `npm test` - run tests once in PhantomJS only |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
NPM Shrinkwrap
Supply chain riskPackage contains a shrinkwrap file. This may allow the package to bypass normal install procedures.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
58
0
984236
26915