We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e04540 commit 5c75bbeCopy full SHA for 5c75bbe
src/cdk/scrolling/virtual-scrollable-window.ts
@@ -6,7 +6,8 @@
6
* found in the LICENSE file at https://angular.dev/license
7
*/
8
9
-import {Directive, ElementRef} from '@angular/core';
+import {Directive, ElementRef, inject} from '@angular/core';
10
+import {DOCUMENT} from '@angular/common';
11
import {CdkVirtualScrollable, VIRTUAL_SCROLLABLE} from './virtual-scrollable';
12
13
/**
@@ -21,6 +22,7 @@ export class CdkVirtualScrollableWindow extends CdkVirtualScrollable {
21
22
23
constructor() {
24
super();
25
+ const document = inject(DOCUMENT);
26
this.elementRef = new ElementRef(document.documentElement);
27
this._scrollElement = document;
28
}
0 commit comments