0

How do I implement Virtual Scroll in angular 5? I tried this Implement Virtual scrolling in angular 6 in angular 5 project but this didn't work. Is there any other way to implement virtual scroll in angular 5?

lets say I have a component displaying the data like this

<div *ngFor="let x of data">
  {{x}}
</div>

and the value of the data is

 public data=[]
  constructor() { 
    for(let i=0;i<1000000000;i++){
      this.data.push(`testing ${i}`)
    }
  }

now this list hangs for such large data set? So I need to add virtual scroll in this component so that it function like first example in https://stackblitz.com/edit/angular-cdk-demo-virtual-scroll?file=package.json

2
  • Please post some code. Commented Apr 3, 2020 at 5:52
  • @hrdkisback gave an example in the question, hope this is okay. Commented Apr 3, 2020 at 6:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.