angular / angular/components

bug(cdk-virtual-scroll-viewport): Content not present in SSR load

オープン
#24,956 コメント 7 件 リアクション 5 件 担当者 0 名 GitHub で見る
area: cdk/scrolling P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

When rendering a page in SSR mode, the content for the virtual scroll is not rendered. It's blank. The page works fine when rendered in the browser. Screenshot attached for the SSR load response
Screenshot 2022-05-23 at 4 31 22 PM
:

### Reproduction

Steps to reproduce:
1. Clone the repo https://github.com/bivs06/angular-universal-ssr-bug
2. Run `npm run dev:ssr`
3. Check the response in the network tab

StackBlitz link: https://stackblitz.com/edit/angular-ivy-kfyv87?file=src%2Fapp%2Fapp.component.html

### Expected Behavior

The items for virtual scroll should load in SSR load

### Actual Behavior

The items for the virtual scroll are not loading in the SSR load

### Environment

- Angular:
- CDK/scrolling:
- Browser(s):
- Operating System (e.g. Windows, macOS, Ubuntu):

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

リンク先の angular-universal-ssr-bug リポジトリをクローンし、`npm run dev:ssr` を実行します。ネットワークレスポンスとブラウザーでレンダリングされたページを比較します。StackBlitz リンクの `src/app/app.component.html` にある再現例と、`cdk-virtual-scroll-viewport` の動作から始めます。SSR レスポンスとブラウザーの両方に virtual-scroll の項目が表示されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。