angular-infinite-listangular 无限滚动列表组件
一个短小精悍的angular无限滚动列表组件,无任何依赖
-
Tiny & dependency free – Only 3kb gzipped
-
Render millions of items, without breaking a sweat
-
Scroll to index or set the initial scroll offset
-
Supports fixed or variable heights/widths
-
Vertical or Horizontal lists
地址:https://github.com/drawcall/angular-infinite-list
例子:https://drawcall.github.io/angular-infinite-list
Using npm:
npm install angular-infinite-list --save
Import angular Infinite list module into your app module
import { InfiniteListModule } from 'angular-infinite-list'; @NgModule({ imports: [ BrowserModule, FormsModule, InfiniteListModule, ...
Wrap Infinite list tag around list items
<infinitelist [width]='"100%"' [height]='500' [data]='data' [itemSize]='50' (update)='event = $event'> <div *ngFor="let item of event?.items; let i=index;" [ngStyle]="event.getStyle(i)"> item{{event.start + i}} : {{item|json}} </div> </infinitelist> or directive usage <div infinitelist [width]='"100%"' ...</div>
评论