Virtual Scrolling has been added to CDK , loading and unloading elements from the DOM based on the visible parts of a list, and making it possible to build very fast experiences for users with very large scrollable lists. The <cdk-virtual-scroll-viewport> displays large lists of elements performance by only rendering the items that fit on-screen. Virtual scrolling is different from strategies like infinite scroll where it renders a set amount of elements and then when you hit the end renders the rest. Firstly, we need to install the Angular CDK package to import the ScrollingModule module. Install the module using NPM - npm install @angular/cdk@latest Table of Contents - 1. To Install the angular CDK package 2. To Import the ScrollingModule module 3. Example 4. Result Example - Open the terminal window an...
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers