https://github.com/meepobrother/meepo-xscroll
xcroll for angular
https://github.com/meepobrother/meepo-xscroll
angular xscroll
Last synced: 2 months ago
JSON representation
xcroll for angular
- Host: GitHub
- URL: https://github.com/meepobrother/meepo-xscroll
- Owner: meepobrother
- License: mit
- Created: 2017-12-22T03:04:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-03T09:21:51.000Z (over 8 years ago)
- Last Synced: 2025-08-09T10:45:45.886Z (11 months ago)
- Topics: angular, xscroll
- Language: JavaScript
- Homepage: https://meepo.com.cn
- Size: 424 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xscroll for angular
```ts
import { XscrollModule } from 'meepo-xscroll';
@NgModule({
imports: [
XscrollModule.forRoot()
]
})
export class AppModule { }
```
```html
{{item}}
{{item}}
```
```ts
export class AppComponent implements OnInit {
items: any[] = [];
constructor(
public cd: ChangeDetectorRef
) { }
ngOnInit() {
for (let i = 0; i < 10; i++) {
this.items.push(i);
}
}
onRefresh(e: any) {
this.items = [];
for (let i = 0; i < 10; i++) {
this.items.push(i);
}
e.next();
}
onLoad(e: any) {
let len = this.items.length;
for (let i = len; i < len + 10; i++) {
this.items.push(i);
}
e.next();
}
}
```