diff --git a/src/components-examples/cdk/scrolling/cdk-virtual-scroll-window-scrolling/cdk-virtual-scroll-window-scrolling-example.html b/src/components-examples/cdk/scrolling/cdk-virtual-scroll-window-scrolling/cdk-virtual-scroll-window-scrolling-example.html
index 016b70b3c70d..b4b6557a1004 100644
--- a/src/components-examples/cdk/scrolling/cdk-virtual-scroll-window-scrolling/cdk-virtual-scroll-window-scrolling-example.html
+++ b/src/components-examples/cdk/scrolling/cdk-virtual-scroll-window-scrolling/cdk-virtual-scroll-window-scrolling-example.html
@@ -1,4 +1,4 @@
-@if (shouldRun) {
+@if (shouldRun()) {
{{item}}
@@ -6,6 +6,6 @@
}
-@if (!shouldRun) {
+@if (!shouldRun()) {
Please open on StackBlitz to see result
}
diff --git a/src/components-examples/cdk/scrolling/cdk-virtual-scroll-window-scrolling/cdk-virtual-scroll-window-scrolling-example.ts b/src/components-examples/cdk/scrolling/cdk-virtual-scroll-window-scrolling/cdk-virtual-scroll-window-scrolling-example.ts
index 629798215464..a1c394397d6b 100644
--- a/src/components-examples/cdk/scrolling/cdk-virtual-scroll-window-scrolling/cdk-virtual-scroll-window-scrolling-example.ts
+++ b/src/components-examples/cdk/scrolling/cdk-virtual-scroll-window-scrolling/cdk-virtual-scroll-window-scrolling-example.ts
@@ -1,4 +1,4 @@
-import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
+import {ChangeDetectionStrategy, Component, input} from '@angular/core';
import {ScrollingModule} from '@angular/cdk/scrolling';
/** @title Virtual scrolling window */
@@ -11,7 +11,7 @@ import {ScrollingModule} from '@angular/cdk/scrolling';
imports: [ScrollingModule],
})
export class CdkVirtualScrollWindowScrollingExample {
- @Input() shouldRun = /(^|.)(stackblitz|webcontainer).(io|com)$/.test(window.location.host);
+ readonly shouldRun = input(/(^|.)(stackblitz|webcontainer).(io|com)$/.test(window.location.host));
items = Array.from({length: 100000}).map((_, i) => `Item #${i}`);
}
diff --git a/src/components-examples/material/table/table-wrapped/table-wrapped-example.ts b/src/components-examples/material/table/table-wrapped/table-wrapped-example.ts
index 6c9adbef7fb0..32b5fe24098f 100644
--- a/src/components-examples/material/table/table-wrapped/table-wrapped-example.ts
+++ b/src/components-examples/material/table/table-wrapped/table-wrapped-example.ts
@@ -3,12 +3,12 @@ import {
AfterContentInit,
Component,
ContentChildren,
- Input,
AfterViewInit,
QueryList,
ViewChild,
ContentChild,
forwardRef,
+ input,
} from '@angular/core';
import {MatSort, MatSortModule} from '@angular/material/sort';
import {
@@ -94,9 +94,8 @@ export class WrapperTable implements AfterContentInit {
@ViewChild(MatTable, {static: true}) table: MatTable;
- @Input() columns: string[];
-
- @Input() dataSource: DataSource;
+ readonly columns = input.required();
+ readonly dataSource = input.required>();
ngAfterContentInit() {
this.columnDefs.forEach(columnDef => this.table.addColumnDef(columnDef));
diff --git a/src/components-examples/material/table/table-wrapped/wrapper-table.html b/src/components-examples/material/table/table-wrapped/wrapper-table.html
index ad3946e88557..ed1477b2b513 100644
--- a/src/components-examples/material/table/table-wrapped/wrapper-table.html
+++ b/src/components-examples/material/table/table-wrapped/wrapper-table.html
@@ -1,4 +1,4 @@
-