https://github.com/wangdahoo/ngscroll
Scroller Component for Angular.js 1.x https://wangdahoo.github.io/ngScroll
https://github.com/wangdahoo/ngscroll
Last synced: about 1 month ago
JSON representation
Scroller Component for Angular.js 1.x https://wangdahoo.github.io/ngScroll
- Host: GitHub
- URL: https://github.com/wangdahoo/ngscroll
- Owner: wangdahoo
- Created: 2016-09-27T07:00:07.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-13T08:47:13.000Z (over 9 years ago)
- Last Synced: 2025-02-28T05:53:15.149Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 604 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Angular Scroll Component 
> smooth scrolling, pull to refresh and infinite loading, for Angular 1.x
## Demo
> see sample code in folder /demo. And checkout demo [here](https://wangdahoo.github.io/ngScroll/)
## Quick Start
```html
```
```js
// code in controller ...
$scope.$watch('items', function (newVal, oldVal) {
$scope.$broadcast('$finishPullToRefresh');
var scroller = $scroller.get('myScroller');
if (scroller) scroller.resize();
});
$scope.onRefresh = function () {
$timeout(function () {
// do change items
}, 2000);
};
$scope.onInfinite = function () {
$timeout(function () {
// do change items
}, 2000);
};
// code in controller ...
```