0
0
Angularframework~5 mins

Virtual scrolling for large lists in Angular - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is virtual scrolling in Angular?
Virtual scrolling is a technique that loads and renders only the visible items in a large list to improve performance and reduce memory use.
Click to reveal answer
beginner
Which Angular module provides virtual scrolling features?
The Angular CDK (Component Dev Kit) provides the ScrollingModule, which includes virtual scrolling components.
Click to reveal answer
intermediate
How does virtual scrolling improve user experience with large lists?
By rendering only visible items, virtual scrolling makes scrolling smooth and fast, avoiding delays and freezes caused by rendering all items at once.
Click to reveal answer
beginner
What component is used in Angular CDK for virtual scrolling?
The component is used to create a viewport that only renders visible list items.
Click to reveal answer
intermediate
Name one key input property of and its purpose.
The 'itemSize' property defines the height (or width) of each item, helping the viewport calculate which items to render.
Click to reveal answer
What does virtual scrolling do in Angular?
ARenders only visible list items to improve performance
BLoads all list items at once for faster access
CDisables scrolling on large lists
DAutomatically paginates the list
Which Angular package provides virtual scrolling components?
A@angular/animations
B@angular/forms
C@angular/router
D@angular/cdk/scrolling
What is the role of the 'itemSize' property in ?
ASets the height or width of each item
BControls the color of items
CSpecifies the scroll speed
DDefines the total number of items
Why is virtual scrolling better than rendering all items in a large list?
AIt uses more memory
BIt slows down the app
CIt improves scrolling smoothness and reduces memory use
DIt disables user interaction
Which HTML element is replaced by for virtual scrolling?
A<div>
B<ul>
C<table>
D<section>
Explain how virtual scrolling works in Angular and why it is useful for large lists.
Think about how showing fewer items at once helps the app run faster.
You got /5 concepts.
    Describe the steps to implement virtual scrolling in an Angular app using the CDK.
    Focus on module import, component usage, and key properties.
    You got /5 concepts.