Angular 无限卷轴与虚拟卷轴的集成
我计划将ngx infinite scroll与angular 7虚拟滚动集成,在我的angular应用程序CLI版本7中,虚拟滚动正在工作,但无限滚动不工作。ngx infinite scroll也在工作,但它希望页面上的应用无限滚动有一个固定的高度 比如:- page.component.html:-Angular 无限卷轴与虚拟卷轴的集成,angular,Angular,我计划将ngx infinite scroll与angular 7虚拟滚动集成,在我的angular应用程序CLI版本7中,虚拟滚动正在工作,但无限滚动不工作。ngx infinite scroll也在工作,但它希望页面上的应用无限滚动有一个固定的高度 比如:- page.component.html:- <div class="center" ngxInfiniteScroller strategy="scrollingToBottom" (onScrollDown)="onSc
<div class="center" ngxInfiniteScroller strategy="scrollingToBottom"
(onScrollDown)="onScroll()"
[ngStyle]="{overflow: 'auto', height: pageHeight + 'px', 'background-color': '#f5f5f5'}">
</div>
public pageHeight: any = screen.height;
import { NgxInfiniteScrollerModule } from 'ngx-infinite-scroller';
@NgModule({
declarations: [
PageComponent
],
imports: [
NgxInfiniteScrollerModule,
],
providers: [
]
})
export class PageModule {
}
page.module.ts:-
<div class="center" ngxInfiniteScroller strategy="scrollingToBottom"
(onScrollDown)="onScroll()"
[ngStyle]="{overflow: 'auto', height: pageHeight + 'px', 'background-color': '#f5f5f5'}">
</div>
public pageHeight: any = screen.height;
import { NgxInfiniteScrollerModule } from 'ngx-infinite-scroller';
@NgModule({
declarations: [
PageComponent
],
imports: [
NgxInfiniteScrollerModule,
],
providers: [
]
})
export class PageModule {
}
实际上,我是用ngx无限卷轴npm来构建无限卷轴的。这是一个不错的选择,我从来不知道虚拟卷轴有自己的活动,谢谢!!