title: cdkVirtualFor does not display anything
body: <p>I have a dialog with the following code that shows several <code>mat-card</code>. The code works perfectly with <code>ngfor</code> and shows what I expect. But because the number of cards was large, I decided to use <code>cdkScrolling</code> , but when I added the code, it did not show anything, even though it was rendered in the code. And the page is displayed almost blank.
  Does anyone know what the problem is? Did I implement it incorrectly?</p>
  <p>dialog.html:</p>
  <pre><code>    &lt;div style=&quot;direction: rtl;position: relative&quot; fxLayout=&quot;row wrap&quot; fxLayoutAlign=&quot;space-around right&quot;&gt;
    &lt;ngx-spinner bdColor=&quot;rgba(0, 0, 0, 0.8)&quot; size=&quot;medium&quot; color=&quot;#fff&quot; type=&quot;ball-clip-rotate&quot;
                 [fullScreen]=&quot;false&quot;&gt;&lt;/ngx-spinner&gt;
    &lt;div fxFlex=&quot;100&quot;&gt;
      &lt;mat-card style=&quot;text-align: center; font-size: 13px&quot;&gt;
        &lt;mat-card-header style=&quot;flex-direction: row; box-sizing: border-box; display: flex;&quot;&gt;
          &lt;img mat-card-avatar #avatarPic [src]=&quot;data.selectedPage.profilePicUrl&quot;
               (error)=&quot;avatarPic.src = 'assets/images/default_image-4_3-640x360.png'&quot;
                &gt;
          &lt;mat-card-title&gt;
            {{data.selectedPage.userName}}
          &lt;/mat-card-title&gt;
          &lt;mat-card-subtitle&gt;
            {{data.selectedPage.bio}}
          &lt;/mat-card-subtitle&gt;
          &lt;span style=&quot;width: 100%&quot;&gt;&lt;/span&gt;
          &lt;button mat-button (click)=&quot;close()&quot;&gt;
            &lt;mat-icon&gt;keyboard_backspace&lt;/mat-icon&gt;
          &lt;/button&gt;
        &lt;/mat-card-header&gt;
        &lt;mat-divider style=&quot;border-top: 1px solid rgb(103, 102, 102)!important&quot;&gt;&lt;/mat-divider&gt;
        &lt;div fxLayout=&quot;row wrap&quot; fxLayoutAlign=&quot;center center&quot; style=&quot;font-size: 16px;margin: 10px&quot;&gt;
          &lt;div fxFlex=&quot;50&quot;&gt; تعداد دنبال کننده: {{data.selectedPage.followerCount}} &lt;/div&gt;
          &lt;div fxFlex=&quot;50&quot; style=&quot;border-right: 1px solid rgb(103, 102, 102);&quot;&gt;  تعداد دنبال شونده: {{data.selectedPage.followingCount}} &lt;/div&gt;
        &lt;/div&gt;
        &lt;mat-divider style=&quot;border-top: 1px solid rgb(103, 102, 102)!important&quot;&gt;&lt;/mat-divider&gt;
      &lt;/mat-card&gt;
    &lt;/div&gt;
    &lt;cdk-virtual-scroll-viewport itemSize=&quot;500&quot;&gt;
    &lt;div *cdkVirtualFor=&quot;let media of medias&quot; fxFlex=&quot;33.33&quot;&gt;
      &lt;mat-card&gt;
        &lt;mat-card-content style=&quot;height: 500px&quot;&gt;
          &lt;img #postImage (error)=&quot;postImage.src = 'assets/images/default_image-4_3-640x360.png'&quot;
               [src]=&quot;media.imageUrl&quot; style=&quot;width: 100%;height: 256px&quot;&gt;
          &lt;p style=&quot;height: 200px;overflow-x: hidden&quot;&gt;{{media.caption}}&lt;/p&gt;
        &lt;/mat-card-content&gt;
        &lt;button mat-button style=&quot;width: 100%;margin-bottom: 5px&quot;&gt;دریافت کامنت ها&lt;/button&gt;
        &lt;mat-divider&gt;&lt;/mat-divider&gt;
        &lt;mat-card-actions style=&quot;padding: 10px;position: relative;display: flex&quot;&gt;
          &lt;div class=&quot;show-profile-likes&quot;&gt;
            &lt;mat-icon style=&quot;vertical-align: bottom;font-size: 15px&quot;&gt;thumb_up_alt&lt;/mat-icon&gt;
            {{media.likesCount}}
          &lt;/div&gt;
          &lt;div class=&quot;show-profile-comments&quot;&gt;
          &lt;mat-icon style=&quot;vertical-align: bottom;font-size: 15px&quot;&gt;insert_comment&lt;/mat-icon&gt;
          {{media.commentsCount}}
        &lt;/div&gt;
          &lt;div class=&quot;show-profile-date&quot;&gt;
            &lt;mat-icon style=&quot;vertical-align: bottom;font-size: 15px&quot;&gt;insert_invitation&lt;/mat-icon&gt;
            {{ media.takenAt | persianDate}}
          &lt;/div&gt;
        &lt;/mat-card-actions&gt;
      &lt;/mat-card&gt;
    &lt;/div&gt;
  &lt;/cdk-virtual-scroll-viewport&gt;
  &lt;/div&gt;
  </code></pre>