1.4.6 • Published 8 years ago

meepo-xscroll v1.4.6

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

xscroll for angular

import { XscrollModule } from 'meepo-xscroll';
@NgModule({
  imports: [
    XscrollModule.forRoot()
  ]
})
export class AppModule { }
<div class="flex">
    <div class="row">
        <xscroll [items]="items" (onLoad)="onLoad($event)" (onRefresh)="onRefresh($event)">
            <ng-template xscrollRef let-item>
                <div>{{item}}</div>
            </ng-template>
        </xscroll>
    </div>
    <div class="row">
        <xscroll [items]="items" (onLoad)="onLoad($event)" (onRefresh)="onRefresh($event)">
            <ng-template xscrollRef let-item>
                <div>{{item}}</div>
            </ng-template>
        </xscroll>
    </div>
</div>
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();
  }
}
1.4.6

8 years ago

1.4.5

8 years ago

1.4.4

8 years ago

1.4.3

8 years ago

1.4.2

8 years ago

1.4.1

8 years ago

1.4.0

8 years ago

1.3.9

8 years ago

1.3.8

8 years ago

1.3.7

8 years ago

1.3.6

8 years ago

1.3.5

8 years ago

1.3.4

8 years ago

1.3.3

8 years ago

1.3.2

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.9

8 years ago

1.2.8

8 years ago

1.2.7

8 years ago

1.2.6

8 years ago

1.2.5

8 years ago

1.1.9

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.8

8 years ago

1.1.7

8 years ago

1.1.6

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago