Hi in my case i have used an angular cdk virtual scroll the scroll element should be in parent so i achieved it using (cdkVirtualScrollingElement) below code:
<ng-scrollbar class="example-viewport" cdkVirtualScrollingElement>
<div class="example-header">Content before</div>
<cdk-virtual-scroll-viewport itemSize="50">
<div *cdkVirtualFor="let item of items" class="example-item">{{item}}</div>
</cdk-virtual-scroll-viewport>
<div class="example-footer">Content after</div>
</ng-scrollbar>`
In my case the parent is ng-scrollbar so im not able to implement the infinite scroll behaviour is there any solution for implement this