一个短小精悍的angular无限滚动列表组件,无任何依赖
Tiny&dependencyfree –Only3kbgzipped
Rendermillionsofitems,withoutbreakingasweat
Scrolltoindex or settheinitialscrolloffset
Supportsfixed or variable heights/widths
Vertical or Horizontal lists
地址:https://github.com/drawcall/angular-infinite-list例子:https://drawcall.github.io/angular-infinite-listUsing npm:npm install angular-infinite-list --saveImportangularInfinitelistmoduleintoyourappmoduleimport { InfiniteListModule } from 'angular-infinite-list';@NgModule({ imports: [ BrowserModule, FormsModule, InfiniteListModule, ...WrapInfinitelisttagaroundlistitems<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>
评论