Last active
May 21, 2019 08:42
-
-
Save stephenwil/827dfc9d574c44faa7397e9f43995ba8 to your computer and use it in GitHub Desktop.
Large Array creation & virtual scrolling in angular
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cdk-virtual-scroll-viewport itemSize="50" class="example-viewport"> | |
<div *cdkVirtualFor="let item of items" class="example-item">{{item}}</div> | |
</cdk-virtual-scroll-viewport> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
items = Array.from({length: 100000}).map((_, i) => `Item #${i}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment