K
K
Konstantin2021-01-27 13:06:24
Angular
Konstantin, 2021-01-27 13:06:24

How to properly use cdk-virtual-scroll-viewport?

The template has:

<cdk-virtual-scroll-viewport itemSize="50">       
 <div *cdkVirtualFor="let item of items">
   {{ item }}
 </div>
</cdk-virtual-scroll-viewport>


In app.module:
ScrollingModule,

I am getting an error in the template:

'cdk-virtual-scroll-viewport' is not a known element:
1. If 'cdk-virtual-scroll-viewport' is an Angular component, then verify that it is part of this module.
2. If 'cdk-virtual-scroll-viewport' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.n

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question