From 5ba800d815ac403639315465ca8d8103b8183ba6 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 12:59:49 +0200 Subject: [PATCH 01/49] refactor(cdk-experimental/selection): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/cdk-experimental/selection/selection-column.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/cdk-experimental/selection/selection-column.ts b/src/cdk-experimental/selection/selection-column.ts index dbeaab3b09ee..ee3e8974c864 100644 --- a/src/cdk-experimental/selection/selection-column.ts +++ b/src/cdk-experimental/selection/selection-column.ts @@ -13,7 +13,6 @@ import { OnDestroy, OnInit, ViewChild, - ChangeDetectionStrategy, ViewEncapsulation, inject, } from '@angular/core'; @@ -54,7 +53,6 @@ import {CdkSelectAll} from './select-all'; `, - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [ CdkColumnDef, From 469b3b4475ca66567b80ca5fa3e9ded927b2df22 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 12:59:54 +0200 Subject: [PATCH 02/49] refactor(cdk/dialog): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/cdk/dialog/dialog.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cdk/dialog/dialog.spec.ts b/src/cdk/dialog/dialog.spec.ts index ddcf52f520da..0e588718e3d2 100644 --- a/src/cdk/dialog/dialog.spec.ts +++ b/src/cdk/dialog/dialog.spec.ts @@ -1328,7 +1328,6 @@ class DirectiveWithViewContainer { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, template: 'hello', }) class ComponentWithOnPushViewContainer { From b33614e452ff787e444532ce42d82f1931bb3350 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 12:59:58 +0200 Subject: [PATCH 03/49] refactor(cdk/drag-drop): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/cdk/drag-drop/directives/drop-list-shared.spec.ts | 3 --- src/cdk/drag-drop/directives/standalone-drag.spec.ts | 1 - src/cdk/drag-drop/drag-drop-registry.ts | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/cdk/drag-drop/directives/drop-list-shared.spec.ts b/src/cdk/drag-drop/directives/drop-list-shared.spec.ts index cc6005e156f7..0506d033452d 100644 --- a/src/cdk/drag-drop/directives/drop-list-shared.spec.ts +++ b/src/cdk/drag-drop/directives/drop-list-shared.spec.ts @@ -5184,7 +5184,6 @@ export class DraggableInDropZone implements AfterViewInit { @Component({ selector: 'draggable-in-on-push-zone', template: DROP_ZONE_FIXTURE_TEMPLATE, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [CdkDropList, CdkDrag, NgFor], }) class DraggableInOnPushDropZone extends DraggableInDropZone {} @@ -5693,7 +5692,6 @@ class NestedDropListGroups { class DropListOnNgContainer {} @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, imports: [CdkDropList, CdkDrag], template: `
@@ -5728,7 +5726,6 @@ class DraggableInDropZoneWithoutEvents {
`, imports: [CdkDropList, CdkDrag], - changeDetection: ChangeDetectionStrategy.OnPush, }) class WrappedDropContainerComponent { @Input() items: string[] | undefined; diff --git a/src/cdk/drag-drop/directives/standalone-drag.spec.ts b/src/cdk/drag-drop/directives/standalone-drag.spec.ts index e88246916ea8..5715e750c8d4 100644 --- a/src/cdk/drag-drop/directives/standalone-drag.spec.ts +++ b/src/cdk/drag-drop/directives/standalone-drag.spec.ts @@ -1897,7 +1897,6 @@ class StandaloneDraggable { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, template: `
`, diff --git a/src/cdk/drag-drop/drag-drop-registry.ts b/src/cdk/drag-drop/drag-drop-registry.ts index 8359b6b00722..71e93cd9f415 100644 --- a/src/cdk/drag-drop/drag-drop-registry.ts +++ b/src/cdk/drag-drop/drag-drop-registry.ts @@ -7,7 +7,6 @@ */ import { - ChangeDetectionStrategy, Component, Service, ListenerOptions, @@ -46,7 +45,6 @@ const activeCapturingEventOptions = { styleUrl: 'resets.css', encapsulation: ViewEncapsulation.None, template: '', - changeDetection: ChangeDetectionStrategy.OnPush, host: {'cdk-drag-resets-container': ''}, }) export class _ResetsLoader {} From 18480dd1d1edacb9ba5c0e288143ac52a6852990 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:00:03 +0200 Subject: [PATCH 04/49] refactor(cdk/overlay): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/cdk/overlay/overlay-container.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/cdk/overlay/overlay-container.ts b/src/cdk/overlay/overlay-container.ts index 29c26a84f8d4..8ad92f1c7267 100644 --- a/src/cdk/overlay/overlay-container.ts +++ b/src/cdk/overlay/overlay-container.ts @@ -6,21 +6,12 @@ * found in the LICENSE file at https://angular.dev/license */ -import { - Service, - OnDestroy, - Component, - ChangeDetectionStrategy, - ViewEncapsulation, - inject, - DOCUMENT, -} from '@angular/core'; +import {Service, OnDestroy, Component, ViewEncapsulation, inject, DOCUMENT} from '@angular/core'; import {_CdkPrivateStyleLoader} from '../private'; import {Platform, _isTestEnvironment} from '../platform'; @Component({ template: '', - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styleUrl: 'overlay-structure.css', host: {'cdk-overlay-style-loader': ''}, From 68c08dc95676f39f472123b0d65b94c30c851f70 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:00:07 +0200 Subject: [PATCH 05/49] refactor(cdk/private): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/cdk/private/visually-hidden/visually-hidden.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cdk/private/visually-hidden/visually-hidden.ts b/src/cdk/private/visually-hidden/visually-hidden.ts index 6d2e51eaefc2..7f1a09a77fa8 100644 --- a/src/cdk/private/visually-hidden/visually-hidden.ts +++ b/src/cdk/private/visually-hidden/visually-hidden.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core'; +import {Component, ViewEncapsulation} from '@angular/core'; /** * Component used to load the .cdk-visually-hidden styles. @@ -17,6 +17,5 @@ import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/co exportAs: 'cdkVisuallyHidden', encapsulation: ViewEncapsulation.None, template: '', - changeDetection: ChangeDetectionStrategy.OnPush, }) export class _VisuallyHiddenLoader {} From 2894acc415c4f37a8ec4786d240dc15de8c81c82 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:00:11 +0200 Subject: [PATCH 06/49] refactor(cdk/scrolling): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/cdk/scrolling/virtual-scroll-viewport.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/cdk/scrolling/virtual-scroll-viewport.ts b/src/cdk/scrolling/virtual-scroll-viewport.ts index a0a93216dbd3..f78192dd0390 100644 --- a/src/cdk/scrolling/virtual-scroll-viewport.ts +++ b/src/cdk/scrolling/virtual-scroll-viewport.ts @@ -12,7 +12,6 @@ import { afterNextRender, ApplicationRef, booleanAttribute, - ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, @@ -77,7 +76,6 @@ export const CDK_VIRTUAL_SCROLL_VIEWPORT = new InjectionToken Date: Thu, 7 May 2026 13:00:15 +0200 Subject: [PATCH 07/49] refactor(cdk/stepper): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/cdk/stepper/stepper.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/cdk/stepper/stepper.ts b/src/cdk/stepper/stepper.ts index 5ffa86c62ca5..da55ca2f61a5 100644 --- a/src/cdk/stepper/stepper.ts +++ b/src/cdk/stepper/stepper.ts @@ -11,7 +11,6 @@ import {Direction, Directionality} from '../bidi'; import {ENTER, hasModifierKey, SPACE} from '../keycodes'; import { AfterViewInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, @@ -107,7 +106,6 @@ export interface StepperOptions { exportAs: 'cdkStep', template: '', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class CdkStep implements OnChanges { private _stepperOptions: StepperOptions; From a4892417c50d3dfba55384531a7594808bec1689 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:00:20 +0200 Subject: [PATCH 08/49] refactor(cdk/table): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/cdk/table/table.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cdk/table/table.spec.ts b/src/cdk/table/table.spec.ts index f23151259794..359ac3e3a8ee 100644 --- a/src/cdk/table/table.spec.ts +++ b/src/cdk/table/table.spec.ts @@ -3325,7 +3325,6 @@ class TableWithIndirectDescendantDefs { `, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [CdkTableModule], }) class NativeHtmlTableAppOnPush { From 0eaecda7b9b9d9c306c69f323cdf56d714a80023 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:00:24 +0200 Subject: [PATCH 09/49] refactor(cdk/testing): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/cdk/testing/tests/test-main-component.ts | 2 -- src/cdk/testing/tests/test-shadow-boundary.ts | 4 +--- src/cdk/testing/tests/test-sub-component.ts | 3 +-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/cdk/testing/tests/test-main-component.ts b/src/cdk/testing/tests/test-main-component.ts index 502bcbec3912..eba523cfe206 100644 --- a/src/cdk/testing/tests/test-main-component.ts +++ b/src/cdk/testing/tests/test-main-component.ts @@ -10,7 +10,6 @@ import {ENTER} from '../../keycodes'; import {_supportsShadowDom} from '../../platform'; import {FormControl, FormsModule, ReactiveFormsModule} from '@angular/forms'; import { - ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, @@ -27,7 +26,6 @@ import {TestSubComponent} from './test-sub-component'; selector: 'test-main', templateUrl: 'test-main-component.html', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [TestShadowBoundary, TestSubComponent, FormsModule, ReactiveFormsModule], }) export class TestMainComponent implements OnDestroy { diff --git a/src/cdk/testing/tests/test-shadow-boundary.ts b/src/cdk/testing/tests/test-shadow-boundary.ts index 02b797e9ca94..9dbf1b29f4a6 100644 --- a/src/cdk/testing/tests/test-shadow-boundary.ts +++ b/src/cdk/testing/tests/test-shadow-boundary.ts @@ -6,12 +6,11 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core'; +import {Component, ViewEncapsulation} from '@angular/core'; @Component({ selector: 'test-sub-shadow-boundary', template: '
Shadow 2
', - changeDetection: ChangeDetectionStrategy.OnPush, // tslint:disable-next-line:validate-decorators encapsulation: ViewEncapsulation.ShadowDom, }) @@ -23,7 +22,6 @@ export class TestSubShadowBoundary {}
Shadow 1
`, - changeDetection: ChangeDetectionStrategy.OnPush, // tslint:disable-next-line:validate-decorators encapsulation: ViewEncapsulation.ShadowDom, imports: [TestSubShadowBoundary], diff --git a/src/cdk/testing/tests/test-sub-component.ts b/src/cdk/testing/tests/test-sub-component.ts index acf34ee9166d..d9fcc7e6fe3e 100644 --- a/src/cdk/testing/tests/test-sub-component.ts +++ b/src/cdk/testing/tests/test-sub-component.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core'; +import {Component, Input, ViewEncapsulation} from '@angular/core'; @Component({ selector: 'test-sub', @@ -18,7 +18,6 @@ import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@ang } `, encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class TestSubComponent { @Input() title = ''; From ec817a3e16431c06f39e81fa7700ece4da8c77eb Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:00:28 +0200 Subject: [PATCH 10/49] refactor(cdk/text-field): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/cdk/text-field/text-field-style-loader.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cdk/text-field/text-field-style-loader.ts b/src/cdk/text-field/text-field-style-loader.ts index e5cce3327f12..90757bba8eab 100644 --- a/src/cdk/text-field/text-field-style-loader.ts +++ b/src/cdk/text-field/text-field-style-loader.ts @@ -6,12 +6,11 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core'; +import {Component, ViewEncapsulation} from '@angular/core'; /** Component used to load the structural styles of the text field. */ @Component({ template: '', - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styleUrl: 'text-field-prebuilt.css', host: {'cdk-text-field-style-loader': ''}, From c31de493d7905184e88e5841386c709be895b6e7 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:00:33 +0200 Subject: [PATCH 11/49] refactor(google-maps): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- .../deprecated-map-marker-clusterer.ts | 2 -- src/google-maps/google-map/google-map.ts | 2 -- src/google-maps/map-marker-clusterer/map-marker-clusterer.ts | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/google-maps/deprecated-map-marker-clusterer/deprecated-map-marker-clusterer.ts b/src/google-maps/deprecated-map-marker-clusterer/deprecated-map-marker-clusterer.ts index 98ca47e5c540..6bde5028c0fd 100644 --- a/src/google-maps/deprecated-map-marker-clusterer/deprecated-map-marker-clusterer.ts +++ b/src/google-maps/deprecated-map-marker-clusterer/deprecated-map-marker-clusterer.ts @@ -8,7 +8,6 @@ import { AfterContentInit, - ChangeDetectionStrategy, Component, ContentChildren, EventEmitter, @@ -59,7 +58,6 @@ declare const MarkerClusterer: typeof MarkerClustererInstance; @Component({ selector: 'deprecated-map-marker-clusterer', exportAs: 'mapMarkerClusterer', - changeDetection: ChangeDetectionStrategy.OnPush, template: '', encapsulation: ViewEncapsulation.None, }) diff --git a/src/google-maps/google-map/google-map.ts b/src/google-maps/google-map/google-map.ts index 4e0e611eb1b0..55a197e40c67 100644 --- a/src/google-maps/google-map/google-map.ts +++ b/src/google-maps/google-map/google-map.ts @@ -7,7 +7,6 @@ */ import { - ChangeDetectionStrategy, Component, ElementRef, Input, @@ -53,7 +52,6 @@ export const DEFAULT_WIDTH = '500px'; @Component({ selector: 'google-map', exportAs: 'googleMap', - changeDetection: ChangeDetectionStrategy.OnPush, template: '
', encapsulation: ViewEncapsulation.None, }) diff --git a/src/google-maps/map-marker-clusterer/map-marker-clusterer.ts b/src/google-maps/map-marker-clusterer/map-marker-clusterer.ts index a1a63f622d8f..73f6cb71e5a3 100644 --- a/src/google-maps/map-marker-clusterer/map-marker-clusterer.ts +++ b/src/google-maps/map-marker-clusterer/map-marker-clusterer.ts @@ -7,7 +7,6 @@ */ import { - ChangeDetectionStrategy, Component, ContentChildren, EventEmitter, @@ -48,7 +47,6 @@ declare const markerClusterer: { @Component({ selector: 'map-marker-clusterer', exportAs: 'mapMarkerClusterer', - changeDetection: ChangeDetectionStrategy.OnPush, template: '', encapsulation: ViewEncapsulation.None, }) From 607e0446f9eb3da25682b8afdccf9c0819830eb3 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:00:37 +0200 Subject: [PATCH 12/49] refactor(material-experimental/column-resize): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material-experimental/column-resize/column-resize.spec.ts | 1 - src/material-experimental/column-resize/overlay-handle.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/material-experimental/column-resize/column-resize.spec.ts b/src/material-experimental/column-resize/column-resize.spec.ts index 1227118e4a59..45fe6d1601b0 100644 --- a/src/material-experimental/column-resize/column-resize.spec.ts +++ b/src/material-experimental/column-resize/column-resize.spec.ts @@ -285,7 +285,6 @@ class MatResizeTest extends BaseTestComponent { @Component({ template: getTableTemplate(false), - changeDetection: ChangeDetectionStrategy.OnPush, imports: [BidiModule, MatTableModule, MatColumnResizeModule], }) class MatResizeOnPushTest extends MatResizeTest {} diff --git a/src/material-experimental/column-resize/overlay-handle.ts b/src/material-experimental/column-resize/overlay-handle.ts index efbe94098f67..22757d6b68bb 100644 --- a/src/material-experimental/column-resize/overlay-handle.ts +++ b/src/material-experimental/column-resize/overlay-handle.ts @@ -7,7 +7,6 @@ */ import { - ChangeDetectionStrategy, Component, ElementRef, NgZone, @@ -36,7 +35,6 @@ import {AbstractMatColumnResize} from './column-resize-directives/common'; * for handling column resize mouse events and displaying a vertical line along the column edge. */ @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {'class': 'mat-column-resize-overlay-thumb'}, template: '
', From 0345e7b3335b18f7b30513fb72d1ee622ad9b966 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:00:41 +0200 Subject: [PATCH 13/49] refactor(material-experimental/menubar): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material-experimental/menubar/menubar-item.ts | 3 +-- src/material-experimental/menubar/menubar.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/material-experimental/menubar/menubar-item.ts b/src/material-experimental/menubar/menubar-item.ts index 1b4a565a18e9..d8c046139aa0 100644 --- a/src/material-experimental/menubar/menubar-item.ts +++ b/src/material-experimental/menubar/menubar-item.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {Component, ViewEncapsulation, ChangeDetectionStrategy} from '@angular/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {CdkMenuItem} from '@angular/cdk/menu'; /** Removes all icons from within the given element. */ @@ -27,7 +27,6 @@ function removeIcons(element: Element) { templateUrl: 'menubar-item.html', styleUrl: 'menubar-item.css', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, host: { '[tabindex]': '_tabindex', 'type': 'button', diff --git a/src/material-experimental/menubar/menubar.ts b/src/material-experimental/menubar/menubar.ts index fbb3da55ae22..26815641be86 100644 --- a/src/material-experimental/menubar/menubar.ts +++ b/src/material-experimental/menubar/menubar.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {CDK_MENU, CdkMenuBar, CdkMenuGroup, MENU_STACK, MenuStack} from '@angular/cdk/menu'; /** @@ -19,7 +19,6 @@ import {CDK_MENU, CdkMenuBar, CdkMenuGroup, MENU_STACK, MenuStack} from '@angula templateUrl: 'menubar.html', styleUrl: 'menubar.css', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class.mat-menubar]': 'true', }, From ecf9485acbc31df173f2608591dc7b5746e9d20b Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:00:46 +0200 Subject: [PATCH 14/49] refactor(material-experimental/selection): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material-experimental/selection/selection-column.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/material-experimental/selection/selection-column.ts b/src/material-experimental/selection/selection-column.ts index 0b74ac1f965b..0bfe04885c37 100644 --- a/src/material-experimental/selection/selection-column.ts +++ b/src/material-experimental/selection/selection-column.ts @@ -20,7 +20,6 @@ import { OnDestroy, OnInit, ViewChild, - ChangeDetectionStrategy, ViewEncapsulation, inject, } from '@angular/core'; @@ -57,7 +56,6 @@ import {MatSelectAll} from './select-all'; `, - changeDetection: ChangeDetectionStrategy.OnPush, styleUrl: 'selection-column.css', encapsulation: ViewEncapsulation.None, imports: [ From 19af054aed4fc1586fe19d8ac4790c41df8f9015 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:00:50 +0200 Subject: [PATCH 15/49] refactor(material/autocomplete): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/autocomplete/autocomplete.spec.ts | 1 - src/material/autocomplete/autocomplete.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/material/autocomplete/autocomplete.spec.ts b/src/material/autocomplete/autocomplete.spec.ts index d4047b006988..916ea277b357 100644 --- a/src/material/autocomplete/autocomplete.spec.ts +++ b/src/material/autocomplete/autocomplete.spec.ts @@ -4086,7 +4086,6 @@ class AutocompleteWithNumbers { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, template: ` diff --git a/src/material/autocomplete/autocomplete.ts b/src/material/autocomplete/autocomplete.ts index 403592e9036f..b87e31282b9e 100644 --- a/src/material/autocomplete/autocomplete.ts +++ b/src/material/autocomplete/autocomplete.ts @@ -8,7 +8,6 @@ import { AfterContentInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, @@ -104,7 +103,6 @@ export const MAT_AUTOCOMPLETE_DEFAULT_OPTIONS = new InjectionToken Date: Thu, 7 May 2026 13:00:54 +0200 Subject: [PATCH 16/49] refactor(material/badge): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/badge/badge.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/material/badge/badge.ts b/src/material/badge/badge.ts index baacdfb68a0d..de816f0a94c4 100644 --- a/src/material/badge/badge.ts +++ b/src/material/badge/badge.ts @@ -10,7 +10,6 @@ import {_IdGenerator, AriaDescriber, InteractivityChecker} from '@angular/cdk/a1 import { booleanAttribute, - ChangeDetectionStrategy, Component, Directive, ElementRef, @@ -51,7 +50,6 @@ const BADGE_CONTENT_CLASS = 'mat-badge-content'; styleUrl: 'badge.css', encapsulation: ViewEncapsulation.None, template: '', - changeDetection: ChangeDetectionStrategy.OnPush, }) export class _MatBadgeStyleLoader {} From 1dbb201af46d5fb0a52cc655c5d20ef192643f72 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:00:59 +0200 Subject: [PATCH 17/49] refactor(material/button-toggle): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/button-toggle/button-toggle.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/material/button-toggle/button-toggle.ts b/src/material/button-toggle/button-toggle.ts index 0f97249c052d..66b5224fa26f 100644 --- a/src/material/button-toggle/button-toggle.ts +++ b/src/material/button-toggle/button-toggle.ts @@ -23,7 +23,6 @@ import { AfterContentInit, AfterViewInit, booleanAttribute, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, @@ -552,7 +551,6 @@ export class MatButtonToggleGroup implements ControlValueAccessor, OnInit, After styleUrl: 'button-toggle.css', encapsulation: ViewEncapsulation.None, exportAs: 'matButtonToggle', - changeDetection: ChangeDetectionStrategy.OnPush, host: { '[class.mat-button-toggle-standalone]': '!buttonToggleGroup', '[class.mat-button-toggle-checked]': 'checked', From 1df306195ae0b39e577416268c8d5aa8f6b14fad Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:01:03 +0200 Subject: [PATCH 18/49] refactor(material/button): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/button/button.ts | 3 +-- src/material/button/fab.ts | 3 --- src/material/button/icon-button.ts | 3 +-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/material/button/button.ts b/src/material/button/button.ts index 1f4e6a7bfda6..4363735c48b8 100644 --- a/src/material/button/button.ts +++ b/src/material/button/button.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core'; +import {Component, Input, ViewEncapsulation} from '@angular/core'; import {MatButtonAppearance, MatButtonBase} from './button-base'; /** @@ -38,7 +38,6 @@ const APPEARANCE_CLASSES: Map = new Map( }, exportAs: 'matButton, matAnchor', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatButton extends MatButtonBase { /** Appearance of the button. */ diff --git a/src/material/button/fab.ts b/src/material/button/fab.ts index 5011b55d5227..f155280d41a8 100644 --- a/src/material/button/fab.ts +++ b/src/material/button/fab.ts @@ -7,7 +7,6 @@ */ import { - ChangeDetectionStrategy, Component, InjectionToken, Input, @@ -64,7 +63,6 @@ const defaults: MatFabDefaultOptions = { }, exportAs: 'matButton, matAnchor', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatFabButton extends MatButtonBase { private _options = inject(MAT_FAB_DEFAULT_OPTIONS, {optional: true}); @@ -94,7 +92,6 @@ export class MatFabButton extends MatButtonBase { }, exportAs: 'matButton, matAnchor', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatMiniFabButton extends MatButtonBase { private _options = inject(MAT_FAB_DEFAULT_OPTIONS, {optional: true}); diff --git a/src/material/button/icon-button.ts b/src/material/button/icon-button.ts index 4af84257846f..1582882d5b36 100644 --- a/src/material/button/icon-button.ts +++ b/src/material/button/icon-button.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {MatButtonBase} from './button-base'; /** @@ -23,7 +23,6 @@ import {MatButtonBase} from './button-base'; }, exportAs: 'matButton, matAnchor', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatIconButton extends MatButtonBase { constructor() { From 8316671841b940b9e4c243058500bbb47eb6bc42 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:01:07 +0200 Subject: [PATCH 19/49] refactor(material/card): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/card/card.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/material/card/card.ts b/src/material/card/card.ts index 6b39287ebec9..e2e0d778d5b0 100644 --- a/src/material/card/card.ts +++ b/src/material/card/card.ts @@ -7,7 +7,6 @@ */ import { - ChangeDetectionStrategy, Component, Directive, InjectionToken, @@ -46,7 +45,6 @@ export const MAT_CARD_CONFIG = new InjectionToken('MAT_CARD_CONFI }, exportAs: 'matCard', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatCard { @Input() appearance: MatCardAppearance; @@ -81,7 +79,6 @@ export class MatCardTitle {} selector: 'mat-card-title-group', templateUrl: 'card-title-group.html', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, host: {'class': 'mat-mdc-card-title-group'}, }) export class MatCardTitleGroup {} @@ -155,7 +152,6 @@ export class MatCardActions { selector: 'mat-card-header', templateUrl: 'card-header.html', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, host: {'class': 'mat-mdc-card-header'}, }) export class MatCardHeader {} From 287bcf08ebf003188f78759746d81d313281a338 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:01:12 +0200 Subject: [PATCH 20/49] refactor(material/checkbox): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/checkbox/checkbox.spec.ts | 1 - src/material/checkbox/checkbox.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/material/checkbox/checkbox.spec.ts b/src/material/checkbox/checkbox.spec.ts index 65219cef98ea..4dc36d493e30 100644 --- a/src/material/checkbox/checkbox.spec.ts +++ b/src/material/checkbox/checkbox.spec.ts @@ -1221,7 +1221,6 @@ class CheckboxWithNgModel { @Component({ template: `Be good`, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCheckbox, FormsModule], }) class CheckboxWithNgModelAndOnPush extends CheckboxWithNgModel {} diff --git a/src/material/checkbox/checkbox.ts b/src/material/checkbox/checkbox.ts index 67f5a30f700a..f009b4bc8ef8 100644 --- a/src/material/checkbox/checkbox.ts +++ b/src/material/checkbox/checkbox.ts @@ -9,7 +9,6 @@ import {_IdGenerator, FocusableOption} from '@angular/cdk/a11y'; import { AfterViewInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, @@ -104,7 +103,6 @@ export class MatCheckboxChange { ], exportAs: 'matCheckbox', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatRipple, _MatInternalFormField], }) export class MatCheckbox From da496c3d78258d73d7bb9a0e825d4dfbfc22af63 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:01:16 +0200 Subject: [PATCH 21/49] refactor(material/chips): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/chips/chip-grid.ts | 2 -- src/material/chips/chip-listbox.ts | 2 -- src/material/chips/chip-option.ts | 2 -- src/material/chips/chip-row.ts | 2 -- src/material/chips/chip-set.ts | 2 -- src/material/chips/chip.ts | 2 -- 6 files changed, 12 deletions(-) diff --git a/src/material/chips/chip-grid.ts b/src/material/chips/chip-grid.ts index a178fd2eb8fe..828e2e7ea779 100644 --- a/src/material/chips/chip-grid.ts +++ b/src/material/chips/chip-grid.ts @@ -12,7 +12,6 @@ import { AfterContentInit, AfterViewInit, booleanAttribute, - ChangeDetectionStrategy, Component, ContentChildren, DoCheck, @@ -76,7 +75,6 @@ export class MatChipGridChange { }, providers: [{provide: MatFormFieldControl, useExisting: MatChipGrid}], encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatChipGrid extends MatChipSet diff --git a/src/material/chips/chip-listbox.ts b/src/material/chips/chip-listbox.ts index 3547fcc73222..14b44a3a4f68 100644 --- a/src/material/chips/chip-listbox.ts +++ b/src/material/chips/chip-listbox.ts @@ -9,7 +9,6 @@ import { AfterContentInit, booleanAttribute, - ChangeDetectionStrategy, Component, ContentChildren, EventEmitter, @@ -80,7 +79,6 @@ export const MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR: any = { }, providers: [MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR], encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatChipListbox extends MatChipSet diff --git a/src/material/chips/chip-option.ts b/src/material/chips/chip-option.ts index 6e28a1a4d429..09897387dac0 100644 --- a/src/material/chips/chip-option.ts +++ b/src/material/chips/chip-option.ts @@ -7,7 +7,6 @@ */ import { - ChangeDetectionStrategy, Component, EventEmitter, Input, @@ -76,7 +75,6 @@ export class MatChipSelectionChange { {provide: MAT_CHIP, useExisting: MatChipOption}, ], encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatChipAction], }) export class MatChipOption extends MatChip implements OnInit { diff --git a/src/material/chips/chip-row.ts b/src/material/chips/chip-row.ts index 57e67a44ef73..a43dc91669a4 100644 --- a/src/material/chips/chip-row.ts +++ b/src/material/chips/chip-row.ts @@ -9,7 +9,6 @@ import {ENTER} from '@angular/cdk/keycodes'; import { AfterViewInit, - ChangeDetectionStrategy, Component, ContentChild, EventEmitter, @@ -72,7 +71,6 @@ export interface MatChipEditedEvent extends MatChipEvent { {provide: MAT_CHIP, useExisting: MatChipRow}, ], encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatChipAction, MatChipEditInput], }) export class MatChipRow extends MatChip implements AfterViewInit, OnDestroy { diff --git a/src/material/chips/chip-set.ts b/src/material/chips/chip-set.ts index ca4ebc246af4..d0e6e16136d4 100644 --- a/src/material/chips/chip-set.ts +++ b/src/material/chips/chip-set.ts @@ -10,7 +10,6 @@ import {FocusKeyManager} from '@angular/cdk/a11y'; import {Directionality} from '@angular/cdk/bidi'; import { AfterViewInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, @@ -47,7 +46,6 @@ import {MatChipAction, MatChipContent} from './chip-action'; '[attr.role]': 'role', }, encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatChipSet implements AfterViewInit, OnDestroy { protected _elementRef = inject>(ElementRef); diff --git a/src/material/chips/chip.ts b/src/material/chips/chip.ts index 9442686b0174..d664c4997264 100644 --- a/src/material/chips/chip.ts +++ b/src/material/chips/chip.ts @@ -13,7 +13,6 @@ import {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/privat import { AfterContentInit, AfterViewInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, @@ -91,7 +90,6 @@ export interface MatChipEvent { '(keydown)': '_handleKeydown($event)', }, encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, providers: [{provide: MAT_CHIP, useExisting: MatChip}], imports: [MatChipContent], }) From bbb2167d934af5f95abc7a9a88ae219c87758fdf Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:01:21 +0200 Subject: [PATCH 22/49] refactor(material/core): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- .../core/focus-indicators/structural-styles.ts | 3 +-- .../core/internal-form-field/internal-form-field.ts | 3 +-- src/material/core/option/optgroup.ts | 2 -- src/material/core/option/option.ts | 2 -- src/material/core/ripple/ripple-renderer.ts | 10 +--------- .../core/selection/pseudo-checkbox/pseudo-checkbox.ts | 3 +-- 6 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/material/core/focus-indicators/structural-styles.ts b/src/material/core/focus-indicators/structural-styles.ts index f099c01c6c38..5ed61e119007 100644 --- a/src/material/core/focus-indicators/structural-styles.ts +++ b/src/material/core/focus-indicators/structural-styles.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core'; +import {Component, ViewEncapsulation} from '@angular/core'; /** * Component used to load structural styles for focus indicators. @@ -17,6 +17,5 @@ import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/co styleUrl: 'structural-styles.css', encapsulation: ViewEncapsulation.None, template: '', - changeDetection: ChangeDetectionStrategy.OnPush, }) export class _StructuralStylesLoader {} diff --git a/src/material/core/internal-form-field/internal-form-field.ts b/src/material/core/internal-form-field/internal-form-field.ts index c6e80478bff0..5442c4f80ae2 100644 --- a/src/material/core/internal-form-field/internal-form-field.ts +++ b/src/material/core/internal-form-field/internal-form-field.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core'; +import {Component, Input, ViewEncapsulation} from '@angular/core'; /** * Internal shared component used as a container in form field controls. @@ -19,7 +19,6 @@ import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@ang template: '', styleUrl: 'internal-form-field.css', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, host: { 'class': 'mdc-form-field mat-internal-form-field', '[class.mdc-form-field--align-end]': 'labelPosition === "before"', diff --git a/src/material/core/option/optgroup.ts b/src/material/core/option/optgroup.ts index b10abc878382..ab231c5a2f94 100644 --- a/src/material/core/option/optgroup.ts +++ b/src/material/core/option/optgroup.ts @@ -9,7 +9,6 @@ import { Component, ViewEncapsulation, - ChangeDetectionStrategy, Input, InjectionToken, booleanAttribute, @@ -53,7 +52,6 @@ export const MAT_OPTGROUP = new InjectionToken('MatOptgroup'); exportAs: 'matOptgroup', templateUrl: 'optgroup.html', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, styleUrl: 'optgroup.css', host: { 'class': 'mat-mdc-optgroup', diff --git a/src/material/core/option/option.ts b/src/material/core/option/option.ts index e22498045e45..a4a893b25489 100644 --- a/src/material/core/option/option.ts +++ b/src/material/core/option/option.ts @@ -11,7 +11,6 @@ import {ENTER, hasModifierKey, SPACE} from '@angular/cdk/keycodes'; import { Component, ViewEncapsulation, - ChangeDetectionStrategy, ElementRef, ChangeDetectorRef, AfterViewChecked, @@ -76,7 +75,6 @@ export class MatOptionSelectionChange { styleUrl: 'option.css', templateUrl: 'option.html', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatPseudoCheckbox, MatRipple], }) export class MatOption implements FocusableOption, AfterViewChecked, OnDestroy { diff --git a/src/material/core/ripple/ripple-renderer.ts b/src/material/core/ripple/ripple-renderer.ts index 4c14b904df5b..d111939d723f 100644 --- a/src/material/core/ripple/ripple-renderer.ts +++ b/src/material/core/ripple/ripple-renderer.ts @@ -5,14 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ -import { - ElementRef, - NgZone, - Component, - ChangeDetectionStrategy, - ViewEncapsulation, - Injector, -} from '@angular/core'; +import {ElementRef, NgZone, Component, ViewEncapsulation, Injector} from '@angular/core'; import {Platform, normalizePassiveListenerOptions, _getEventTarget} from '@angular/cdk/platform'; import {isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader} from '@angular/cdk/a11y'; import {coerceElement} from '@angular/cdk/coercion'; @@ -68,7 +61,6 @@ const pointerUpEvents = ['mouseup', 'mouseleave', 'touchend', 'touchcancel']; @Component({ template: '', - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styleUrl: 'ripple-structure.css', host: {'mat-ripple-style-loader': ''}, diff --git a/src/material/core/selection/pseudo-checkbox/pseudo-checkbox.ts b/src/material/core/selection/pseudo-checkbox/pseudo-checkbox.ts index 59b76d6176fe..5f08516f06f0 100644 --- a/src/material/core/selection/pseudo-checkbox/pseudo-checkbox.ts +++ b/src/material/core/selection/pseudo-checkbox/pseudo-checkbox.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {Component, ViewEncapsulation, Input, ChangeDetectionStrategy} from '@angular/core'; +import {Component, ViewEncapsulation, Input} from '@angular/core'; import {_animationsDisabled} from '../../animation/animation'; /** @@ -30,7 +30,6 @@ export type MatPseudoCheckboxState = 'unchecked' | 'checked' | 'indeterminate'; */ @Component({ encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, selector: 'mat-pseudo-checkbox', styleUrl: 'pseudo-checkbox.css', template: '', From 2bc3161360e7b6711bbbb853c6a9c17e9368ecf3 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:01:25 +0200 Subject: [PATCH 23/49] refactor(material/datepicker): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/datepicker/calendar-body.ts | 2 -- src/material/datepicker/calendar.ts | 3 --- src/material/datepicker/date-range-input.ts | 2 -- src/material/datepicker/date-range-picker.ts | 3 +-- src/material/datepicker/datepicker-actions.ts | 2 -- src/material/datepicker/datepicker-base.ts | 2 -- src/material/datepicker/datepicker-toggle.ts | 2 -- src/material/datepicker/datepicker.ts | 3 +-- src/material/datepicker/month-view.ts | 2 -- src/material/datepicker/multi-year-view.ts | 2 -- src/material/datepicker/year-view.ts | 2 -- 11 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/material/datepicker/calendar-body.ts b/src/material/datepicker/calendar-body.ts index 7970d0b107cf..73140921a559 100644 --- a/src/material/datepicker/calendar-body.ts +++ b/src/material/datepicker/calendar-body.ts @@ -8,7 +8,6 @@ import {Platform} from '@angular/cdk/platform'; import { - ChangeDetectionStrategy, Component, ElementRef, EventEmitter, @@ -96,7 +95,6 @@ const passiveEventOptions = {passive: true}; }, exportAs: 'matCalendarBody', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatCalendarBody implements OnChanges, OnDestroy, AfterViewChecked { private _elementRef = inject>(ElementRef); diff --git a/src/material/datepicker/calendar.ts b/src/material/datepicker/calendar.ts index 8b5d2a13b704..67fe3ed0a75d 100644 --- a/src/material/datepicker/calendar.ts +++ b/src/material/datepicker/calendar.ts @@ -10,7 +10,6 @@ import {CdkPortalOutlet, ComponentPortal, ComponentType, Portal} from '@angular/ import { AfterContentInit, AfterViewChecked, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, @@ -57,7 +56,6 @@ export type MatCalendarView = 'month' | 'year' | 'multi-year'; templateUrl: 'calendar-header.html', exportAs: 'matCalendarHeader', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButton, MatIconButton, MatTooltip], }) export class MatCalendarHeader { @@ -252,7 +250,6 @@ export class MatCalendarHeader { }, exportAs: 'matCalendar', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, providers: [MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER], imports: [CdkPortalOutlet, CdkMonitorFocus, MatMonthView, MatYearView, MatMultiYearView], }) diff --git a/src/material/datepicker/date-range-input.ts b/src/material/datepicker/date-range-input.ts index c71958edbbae..f2486041beb2 100644 --- a/src/material/datepicker/date-range-input.ts +++ b/src/material/datepicker/date-range-input.ts @@ -9,7 +9,6 @@ import {_IdGenerator, CdkMonitorFocus, FocusOrigin} from '@angular/cdk/a11y'; import { AfterContentInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, @@ -50,7 +49,6 @@ import {DateFilterFn, _MatFormFieldPartial, dateInputsHaveChanged} from './datep // `aria-owns` for this, because it's only defined while the calendar is open. '[attr.data-mat-calendar]': 'rangePicker ? rangePicker.id : null', }, - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{provide: MatFormFieldControl, useExisting: MatDateRangeInput}], imports: [CdkMonitorFocus], diff --git a/src/material/datepicker/date-range-picker.ts b/src/material/datepicker/date-range-picker.ts index b9d8326e255c..7d094e7d7536 100644 --- a/src/material/datepicker/date-range-picker.ts +++ b/src/material/datepicker/date-range-picker.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, inject, ViewEncapsulation} from '@angular/core'; +import {Component, inject, ViewEncapsulation} from '@angular/core'; import {MatDatepickerBase, MatDatepickerContent, MatDatepickerControl} from './datepicker-base'; import {MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER, DateRange} from './date-selection-model'; import { @@ -34,7 +34,6 @@ export interface MatDateRangePickerInput extends MatDatepickerControl { selector: 'mat-date-range-picker', template: '', exportAs: 'matDateRangePicker', - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [ MAT_RANGE_DATE_SELECTION_MODEL_PROVIDER, diff --git a/src/material/datepicker/datepicker-actions.ts b/src/material/datepicker/datepicker-actions.ts index 5b21c9d47cae..d7692b5989c2 100644 --- a/src/material/datepicker/datepicker-actions.ts +++ b/src/material/datepicker/datepicker-actions.ts @@ -8,7 +8,6 @@ import { AfterViewInit, - ChangeDetectionStrategy, Component, Directive, OnDestroy, @@ -59,7 +58,6 @@ export class MatDatepickerCancel { `, - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) export class MatDatepickerActions implements AfterViewInit, OnDestroy { diff --git a/src/material/datepicker/datepicker-base.ts b/src/material/datepicker/datepicker-base.ts index 8ff4a52ebeb8..9b4958b3560b 100644 --- a/src/material/datepicker/datepicker-base.ts +++ b/src/material/datepicker/datepicker-base.ts @@ -38,7 +38,6 @@ import { afterNextRender, AfterViewInit, booleanAttribute, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ComponentRef, @@ -117,7 +116,6 @@ export type DatepickerDropdownPositionY = 'above' | 'below'; }, exportAs: 'matDatepickerContent', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [CdkTrapFocus, MatCalendar, CdkPortalOutlet, MatButton], }) export class MatDatepickerContent> diff --git a/src/material/datepicker/datepicker-toggle.ts b/src/material/datepicker/datepicker-toggle.ts index c68741145a49..7646acddb317 100644 --- a/src/material/datepicker/datepicker-toggle.ts +++ b/src/material/datepicker/datepicker-toggle.ts @@ -8,7 +8,6 @@ import { AfterContentInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, @@ -53,7 +52,6 @@ export class MatDatepickerToggleIcon {} }, exportAs: 'matDatepickerToggle', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIconButton], }) export class MatDatepickerToggle implements AfterContentInit, OnChanges, OnDestroy { diff --git a/src/material/datepicker/datepicker.ts b/src/material/datepicker/datepicker.ts index cdae6ec8f2fa..639402be9cab 100644 --- a/src/material/datepicker/datepicker.ts +++ b/src/material/datepicker/datepicker.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {MatDatepickerBase, MatDatepickerControl} from './datepicker-base'; import {MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER} from './date-selection-model'; @@ -18,7 +18,6 @@ import {MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER} from './date-selection-model'; selector: 'mat-datepicker', template: '', exportAs: 'matDatepicker', - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [ MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER, diff --git a/src/material/datepicker/month-view.ts b/src/material/datepicker/month-view.ts index 1943b1f6d403..8d248096a9c6 100644 --- a/src/material/datepicker/month-view.ts +++ b/src/material/datepicker/month-view.ts @@ -22,7 +22,6 @@ import { } from '@angular/cdk/keycodes'; import { AfterContentInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, @@ -67,7 +66,6 @@ let uniqueIdCounter = 0; templateUrl: 'month-view.html', exportAs: 'matMonthView', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCalendarBody], }) export class MatMonthView implements AfterContentInit, OnChanges, OnDestroy { diff --git a/src/material/datepicker/multi-year-view.ts b/src/material/datepicker/multi-year-view.ts index 8c547de3e559..24211f2d7631 100644 --- a/src/material/datepicker/multi-year-view.ts +++ b/src/material/datepicker/multi-year-view.ts @@ -20,7 +20,6 @@ import { } from '@angular/cdk/keycodes'; import { AfterContentInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, @@ -58,7 +57,6 @@ export const yearsPerRow = 4; templateUrl: 'multi-year-view.html', exportAs: 'matMultiYearView', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCalendarBody], }) export class MatMultiYearView implements AfterContentInit, OnDestroy { diff --git a/src/material/datepicker/year-view.ts b/src/material/datepicker/year-view.ts index f841ec72eb8a..60765eb90263 100644 --- a/src/material/datepicker/year-view.ts +++ b/src/material/datepicker/year-view.ts @@ -20,7 +20,6 @@ import { } from '@angular/cdk/keycodes'; import { AfterContentInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, @@ -54,7 +53,6 @@ import {DateRange} from './date-selection-model'; templateUrl: 'year-view.html', exportAs: 'matYearView', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatCalendarBody], }) export class MatYearView implements AfterContentInit, OnDestroy { From 70912bf88d063ccf2486672e4036af60ca05bbca Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:01:30 +0200 Subject: [PATCH 24/49] refactor(material/dialog): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/dialog/dialog.spec.ts | 3 --- src/material/dialog/testing/dialog-opener.ts | 11 +---------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/material/dialog/dialog.spec.ts b/src/material/dialog/dialog.spec.ts index aaeeecf4ff2d..504a0a7aeadc 100644 --- a/src/material/dialog/dialog.spec.ts +++ b/src/material/dialog/dialog.spec.ts @@ -1793,7 +1793,6 @@ describe('MatDialog', () => { @Component({ imports: [Child], template: ``, - changeDetection: ChangeDetectionStrategy.OnPush, }) class OnPushHost { @ViewChild(Child, {static: true}) child!: Child; @@ -2304,7 +2303,6 @@ class DirectiveWithViewContainer { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, template: 'hello', }) class ComponentWithOnPushViewContainer { @@ -2508,7 +2506,6 @@ class ModuleBoundDialogModule {} @Component({ template: `{{message | async}}`, imports: [AsyncPipe], - changeDetection: ChangeDetectionStrategy.OnPush, }) class DialogWithAfterOpenSubscription { dialogRef = inject(MatDialogRef); diff --git a/src/material/dialog/testing/dialog-opener.ts b/src/material/dialog/testing/dialog-opener.ts index 11ba7b4ee6a7..43e55b5c713a 100644 --- a/src/material/dialog/testing/dialog-opener.ts +++ b/src/material/dialog/testing/dialog-opener.ts @@ -7,15 +7,7 @@ */ import {ComponentType} from '@angular/cdk/overlay'; -import { - ChangeDetectionStrategy, - Component, - NgModule, - NgZone, - OnDestroy, - ViewEncapsulation, - inject, -} from '@angular/core'; +import {Component, NgModule, NgZone, OnDestroy, ViewEncapsulation, inject} from '@angular/core'; import {MatDialog, MatDialogConfig, MatDialogModule, MatDialogRef} from '../../dialog'; import {Subscription} from 'rxjs'; import {AnimationsConfig, MATERIAL_ANIMATIONS} from '@angular/material/core'; @@ -24,7 +16,6 @@ import {AnimationsConfig, MATERIAL_ANIMATIONS} from '@angular/material/core'; @Component({ selector: 'mat-test-dialog-opener', template: '', - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) export class MatTestDialogOpener implements OnDestroy { From fcc06a66128fcfb7096bf71e77c61e65ff9d004f Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:01:34 +0200 Subject: [PATCH 25/49] refactor(material/divider): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/divider/divider.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/material/divider/divider.ts b/src/material/divider/divider.ts index b1ccf98cf769..316a24e472d7 100644 --- a/src/material/divider/divider.ts +++ b/src/material/divider/divider.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core'; +import {Component, Input, ViewEncapsulation} from '@angular/core'; import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; @Component({ @@ -22,7 +22,6 @@ import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; template: '', styleUrl: 'divider.css', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatDivider { /** Whether the divider is vertically aligned. */ From af7ef9c46d7dfa9b5ea3668445aa21788ffe86bb Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:01:38 +0200 Subject: [PATCH 26/49] refactor(material/expansion): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/expansion/expansion-panel-header.ts | 2 -- src/material/expansion/expansion-panel.ts | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/material/expansion/expansion-panel-header.ts b/src/material/expansion/expansion-panel-header.ts index cba5eb006f31..1c7ee65ccff7 100644 --- a/src/material/expansion/expansion-panel-header.ts +++ b/src/material/expansion/expansion-panel-header.ts @@ -10,7 +10,6 @@ import {FocusableOption, FocusMonitor, FocusOrigin} from '@angular/cdk/a11y'; import {ENTER, hasModifierKey, SPACE} from '@angular/cdk/keycodes'; import { AfterViewInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, Directive, @@ -41,7 +40,6 @@ import {_StructuralStylesLoader} from '../core'; styleUrl: 'expansion-panel-header.css', templateUrl: 'expansion-panel-header.html', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, host: { 'class': 'mat-expansion-panel-header mat-focus-indicator', 'role': 'button', diff --git a/src/material/expansion/expansion-panel.ts b/src/material/expansion/expansion-panel.ts index 70ff86e07b2f..b89e4c17c8bd 100644 --- a/src/material/expansion/expansion-panel.ts +++ b/src/material/expansion/expansion-panel.ts @@ -12,7 +12,6 @@ import {CdkPortalOutlet, TemplatePortal} from '@angular/cdk/portal'; import { AfterContentInit, - ChangeDetectionStrategy, Component, ContentChild, Directive, @@ -76,7 +75,6 @@ export const MAT_EXPANSION_PANEL_DEFAULT_OPTIONS = exportAs: 'matExpansionPanel', templateUrl: 'expansion-panel.html', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, providers: [ // Provide MatAccordion as undefined to prevent nested expansion panels from registering // to the same accordion. From ef137c433a266eab9283a402d1dfe03d93e203be Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:01:43 +0200 Subject: [PATCH 27/49] refactor(material/form-field): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/form-field/directives/notched-outline.ts | 2 -- src/material/form-field/form-field.ts | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/material/form-field/directives/notched-outline.ts b/src/material/form-field/directives/notched-outline.ts index e485293a01b5..216e2b5eb540 100644 --- a/src/material/form-field/directives/notched-outline.ts +++ b/src/material/form-field/directives/notched-outline.ts @@ -8,7 +8,6 @@ import { AfterViewInit, - ChangeDetectionStrategy, Component, ElementRef, Input, @@ -33,7 +32,6 @@ import { // a host binding in order to ensure that the notched-outline renders correctly on the server. '[class.mdc-notched-outline--notched]': 'open', }, - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) export class MatFormFieldNotchedOutline implements AfterViewInit { diff --git a/src/material/form-field/form-field.ts b/src/material/form-field/form-field.ts index 2615dedaec20..5ce0506e73c7 100644 --- a/src/material/form-field/form-field.ts +++ b/src/material/form-field/form-field.ts @@ -14,7 +14,6 @@ import { AfterContentChecked, AfterContentInit, AfterViewInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, @@ -173,7 +172,6 @@ interface MatFormFieldControl extends _MatFormFieldControl {} '[class.ng-pending]': '_shouldForward("pending")', }, encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, providers: [ {provide: MAT_FORM_FIELD, useExisting: MatFormField}, {provide: FLOATING_LABEL_PARENT, useExisting: MatFormField}, From 59d5f377fb8ff80b6867ffc54d86ec759aff7f72 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:01:47 +0200 Subject: [PATCH 28/49] refactor(material/grid-list): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/grid-list/grid-list.ts | 2 -- src/material/grid-list/grid-tile.ts | 3 --- 2 files changed, 5 deletions(-) diff --git a/src/material/grid-list/grid-list.ts b/src/material/grid-list/grid-list.ts index 321c3db883bb..f702321936cc 100644 --- a/src/material/grid-list/grid-list.ts +++ b/src/material/grid-list/grid-list.ts @@ -15,7 +15,6 @@ import { ContentChildren, QueryList, ElementRef, - ChangeDetectionStrategy, inject, } from '@angular/core'; import {MatGridTile} from './grid-tile'; @@ -54,7 +53,6 @@ const MAT_FIT_MODE = 'fit'; useExisting: MatGridList, }, ], - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) export class MatGridList implements MatGridListBase, OnInit, AfterContentChecked, TileStyleTarget { diff --git a/src/material/grid-list/grid-tile.ts b/src/material/grid-list/grid-tile.ts index a25ec41ec8dc..65c9c6fd7f27 100644 --- a/src/material/grid-list/grid-tile.ts +++ b/src/material/grid-list/grid-tile.ts @@ -15,7 +15,6 @@ import { QueryList, AfterContentInit, Directive, - ChangeDetectionStrategy, inject, } from '@angular/core'; import {MatLine, setLines} from '../core'; @@ -35,7 +34,6 @@ import {MAT_GRID_LIST, MatGridListBase} from './grid-list-base'; templateUrl: 'grid-tile.html', styleUrl: 'grid-list.css', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatGridTile { private _element = inject>(ElementRef); @@ -74,7 +72,6 @@ export class MatGridTile { @Component({ selector: 'mat-grid-tile-header, mat-grid-tile-footer', templateUrl: 'grid-tile-text.html', - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) export class MatGridTileText implements AfterContentInit { From 91cf004bf01263c5e7f2a7e29a971fda5a118717 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:01:51 +0200 Subject: [PATCH 29/49] refactor(material/icon): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/icon/icon.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/material/icon/icon.ts b/src/material/icon/icon.ts index bff17d27c887..e94f4cb6716d 100644 --- a/src/material/icon/icon.ts +++ b/src/material/icon/icon.ts @@ -9,7 +9,6 @@ import { AfterViewChecked, booleanAttribute, - ChangeDetectionStrategy, Component, ElementRef, ErrorHandler, @@ -145,7 +144,6 @@ const funcIriPattern = /^url\(['"]?#(.*?)['"]?\)$/; '[class.mat-icon-no-color]': 'color !== "primary" && color !== "accent" && color !== "warn"', }, encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatIcon implements OnInit, AfterViewChecked, OnDestroy { readonly _elementRef = inject>(ElementRef); From 414297fd393f7bd24012ca84a54f353bbf49ca21 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:01:56 +0200 Subject: [PATCH 30/49] refactor(material/input): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/input/input.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/material/input/input.spec.ts b/src/material/input/input.spec.ts index f7bf11ae5ab9..27a3c8dbfa0a 100644 --- a/src/material/input/input.spec.ts +++ b/src/material/input/input.spec.ts @@ -2140,7 +2140,6 @@ class MatInputWithNgIf { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, template: ` Label From 8ada30bd84d9610b3410a37d25f35decb412d052 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:02:00 +0200 Subject: [PATCH 31/49] refactor(material/list): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/list/action-list.ts | 3 +-- src/material/list/list-option.ts | 2 -- src/material/list/list.ts | 3 --- src/material/list/nav-list.ts | 3 +-- src/material/list/selection-list.spec.ts | 1 - src/material/list/selection-list.ts | 2 -- 6 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/material/list/action-list.ts b/src/material/list/action-list.ts index 5e074c0e9ce0..d8617f381b2f 100644 --- a/src/material/list/action-list.ts +++ b/src/material/list/action-list.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core'; +import {Component, ViewEncapsulation} from '@angular/core'; import {MatListBase} from './list-base'; @Component({ @@ -19,7 +19,6 @@ import {MatListBase} from './list-base'; }, styleUrl: 'list.css', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, providers: [{provide: MatListBase, useExisting: MatActionList}], }) export class MatActionList extends MatListBase { diff --git a/src/material/list/list-option.ts b/src/material/list/list-option.ts index 91af343da26f..4ee9bd60ae81 100644 --- a/src/material/list/list-option.ts +++ b/src/material/list/list-option.ts @@ -9,7 +9,6 @@ import {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion'; import {SelectionModel} from '@angular/cdk/collections'; import { - ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, @@ -92,7 +91,6 @@ export interface SelectionList extends MatListBase { }, templateUrl: 'list-option.html', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, providers: [ {provide: MatListItemBase, useExisting: MatListOption}, {provide: LIST_OPTION, useExisting: MatListOption}, diff --git a/src/material/list/list.ts b/src/material/list/list.ts index 8eec1784c9b4..91f2544d0da4 100644 --- a/src/material/list/list.ts +++ b/src/material/list/list.ts @@ -7,7 +7,6 @@ */ import { - ChangeDetectionStrategy, Component, Input, ContentChildren, @@ -38,7 +37,6 @@ export const MAT_LIST = new InjectionToken('MatList'); }, styleUrl: 'list.css', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, providers: [{provide: MatListBase, useExisting: MatList}], }) export class MatList extends MatListBase {} @@ -60,7 +58,6 @@ export class MatList extends MatListBase {} }, templateUrl: 'list-item.html', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [CdkObserveContent], }) export class MatListItem extends MatListItemBase { diff --git a/src/material/list/nav-list.ts b/src/material/list/nav-list.ts index f86700e99f1c..e3fd276fdf5c 100644 --- a/src/material/list/nav-list.ts +++ b/src/material/list/nav-list.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, InjectionToken, ViewEncapsulation} from '@angular/core'; +import {Component, InjectionToken, ViewEncapsulation} from '@angular/core'; import {MatListBase} from './list-base'; /** @@ -26,7 +26,6 @@ export const MAT_NAV_LIST = new InjectionToken('MatNavList'); }, styleUrl: 'list.css', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, providers: [{provide: MatListBase, useExisting: MatNavList}], }) export class MatNavList extends MatListBase { diff --git a/src/material/list/selection-list.spec.ts b/src/material/list/selection-list.spec.ts index 0f6768818571..63a3bf13f5bd 100644 --- a/src/material/list/selection-list.spec.ts +++ b/src/material/list/selection-list.spec.ts @@ -1873,7 +1873,6 @@ class SelectionListWithPreselectedOptionAndModel { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, template: ` @for (opt of opts; track opt) { diff --git a/src/material/list/selection-list.ts b/src/material/list/selection-list.ts index 1d6d073f1a6c..3731fcbfa57c 100644 --- a/src/material/list/selection-list.ts +++ b/src/material/list/selection-list.ts @@ -13,7 +13,6 @@ import {A, ENTER, SPACE, hasModifierKey} from '@angular/cdk/keycodes'; import {_getFocusedElementPierceShadowDom} from '@angular/cdk/platform'; import { AfterViewInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, @@ -72,7 +71,6 @@ export class MatSelectionListChange { {provide: MatListBase, useExisting: MatSelectionList}, {provide: SELECTION_LIST, useExisting: MatSelectionList}, ], - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatSelectionList extends MatListBase From b66975e70cd35964b058a7d1ae4b2f0be68ab176 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:02:05 +0200 Subject: [PATCH 32/49] refactor(material/menu): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/menu/menu-item.ts | 2 -- src/material/menu/menu.spec.ts | 2 -- src/material/menu/menu.ts | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/material/menu/menu-item.ts b/src/material/menu/menu-item.ts index fc776e943a6b..e16ea30a4114 100644 --- a/src/material/menu/menu-item.ts +++ b/src/material/menu/menu-item.ts @@ -7,7 +7,6 @@ */ import { - ChangeDetectionStrategy, Component, ElementRef, OnDestroy, @@ -43,7 +42,6 @@ import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; '(click)': '_checkDisabled($event)', '(mouseenter)': '_handleMouseEnter()', }, - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, templateUrl: 'menu-item.html', imports: [MatRipple], diff --git a/src/material/menu/menu.spec.ts b/src/material/menu/menu.spec.ts index cb9401540919..908e6eb32ff4 100644 --- a/src/material/menu/menu.spec.ts +++ b/src/material/menu/menu.spec.ts @@ -2520,7 +2520,6 @@ class SimpleMenu { @Component({ template: SIMPLE_MENU_TEMPLATE, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatMenuTrigger, MatMenu, MatMenuItem, FakeIcon], selector: 'simple-menu-on-push', }) @@ -2892,7 +2891,6 @@ class SimpleMenuWithRepeaterInLazyContent { `, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatMenuTrigger, MatMenu, MatMenuItem, MatMenuContent], }) class LazyMenuWithOnPush { diff --git a/src/material/menu/menu.ts b/src/material/menu/menu.ts index f04927647846..9a76162a8611 100644 --- a/src/material/menu/menu.ts +++ b/src/material/menu/menu.ts @@ -8,7 +8,6 @@ import { AfterContentInit, - ChangeDetectionStrategy, Component, ContentChild, ContentChildren, @@ -98,7 +97,6 @@ const EXIT_ANIMATION = '_mat-menu-exit'; selector: 'mat-menu', templateUrl: 'menu.html', styleUrl: 'menu.css', - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, exportAs: 'matMenu', host: { From bd03e4c16f759c279fbceafb3694841c64d19557 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:02:09 +0200 Subject: [PATCH 33/49] refactor(material/paginator): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/paginator/paginator.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/material/paginator/paginator.ts b/src/material/paginator/paginator.ts index ff5c63bd80cb..4bb81e71b631 100644 --- a/src/material/paginator/paginator.ts +++ b/src/material/paginator/paginator.ts @@ -7,7 +7,6 @@ */ import { - ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, @@ -104,7 +103,6 @@ export const MAT_PAGINATOR_DEFAULT_OPTIONS = new InjectionToken Date: Thu, 7 May 2026 13:02:14 +0200 Subject: [PATCH 34/49] refactor(material/progress-bar): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/progress-bar/progress-bar.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/material/progress-bar/progress-bar.ts b/src/material/progress-bar/progress-bar.ts index 65a0402257ba..afc75ebadc85 100644 --- a/src/material/progress-bar/progress-bar.ts +++ b/src/material/progress-bar/progress-bar.ts @@ -7,7 +7,6 @@ */ import { - ChangeDetectionStrategy, Component, ViewEncapsulation, ElementRef, @@ -104,7 +103,6 @@ export type ProgressBarMode = 'determinate' | 'indeterminate' | 'buffer' | 'quer }, templateUrl: 'progress-bar.html', styleUrl: 'progress-bar.css', - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) export class MatProgressBar implements AfterViewInit, OnDestroy { From 5ad8b2d8f9c845f47ca907c17d29c8b884b4a48d Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:02:18 +0200 Subject: [PATCH 35/49] refactor(material/progress-spinner): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/progress-spinner/progress-spinner.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/material/progress-spinner/progress-spinner.ts b/src/material/progress-spinner/progress-spinner.ts index a82c39b27e72..d8a8c02eb74f 100644 --- a/src/material/progress-spinner/progress-spinner.ts +++ b/src/material/progress-spinner/progress-spinner.ts @@ -7,7 +7,6 @@ */ import { - ChangeDetectionStrategy, Component, ElementRef, InjectionToken, @@ -84,7 +83,6 @@ const BASE_STROKE_WIDTH = 10; }, templateUrl: 'progress-spinner.html', styleUrl: 'progress-spinner.css', - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [NgTemplateOutlet], }) From 5ca4bafb57e07bbe63677a6226da4c7494cbee51 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:02:23 +0200 Subject: [PATCH 36/49] refactor(material/radio): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/radio/radio.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/material/radio/radio.ts b/src/material/radio/radio.ts index 576150f7e3a7..911800951b25 100644 --- a/src/material/radio/radio.ts +++ b/src/material/radio/radio.ts @@ -11,7 +11,6 @@ import {UniqueSelectionDispatcher} from '@angular/cdk/collections'; import { AfterContentInit, AfterViewInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, @@ -399,7 +398,6 @@ export class MatRadioGroup implements AfterContentInit, OnDestroy, ControlValueA }, exportAs: 'matRadioButton', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatRipple, _MatInternalFormField], }) export class MatRadioButton implements OnInit, AfterViewInit, DoCheck, OnDestroy { From ef2c034ecb5646299e80e6cd527bad638f3c39ca Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:02:27 +0200 Subject: [PATCH 37/49] refactor(material/select): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/select/select.spec.ts | 2 -- src/material/select/select.ts | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/material/select/select.spec.ts b/src/material/select/select.spec.ts index 20706994f1d4..9728ec2d78ac 100644 --- a/src/material/select/select.spec.ts +++ b/src/material/select/select.spec.ts @@ -4712,7 +4712,6 @@ class SelectWithErrorSibling { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, template: ` @@ -4734,7 +4733,6 @@ class BasicSelectOnPush { } @Component({ - changeDetection: ChangeDetectionStrategy.OnPush, template: ` diff --git a/src/material/select/select.ts b/src/material/select/select.ts index 94efdfec1f28..1da854febeac 100644 --- a/src/material/select/select.ts +++ b/src/material/select/select.ts @@ -33,7 +33,6 @@ import {ViewportRuler} from '@angular/cdk/scrolling'; import { AfterContentInit, booleanAttribute, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, @@ -154,7 +153,6 @@ export class MatSelectChange { templateUrl: 'select.html', styleUrl: 'select.css', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, host: { 'role': 'combobox', 'aria-haspopup': 'listbox', From 362b938d1858f08afd27b757b2929f22f53de52c Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:02:31 +0200 Subject: [PATCH 38/49] refactor(material/sidenav): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/sidenav/drawer.ts | 4 ---- src/material/sidenav/sidenav.ts | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/material/sidenav/drawer.ts b/src/material/sidenav/drawer.ts index 0703559ac05d..b8fb36fd6657 100644 --- a/src/material/sidenav/drawer.ts +++ b/src/material/sidenav/drawer.ts @@ -22,7 +22,6 @@ import { AfterContentInit, afterNextRender, AfterViewInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, @@ -89,7 +88,6 @@ export const MAT_DRAWER_CONTAINER = new InjectionToken('MAT_ '[style.margin-right.px]': '_container._contentMargins.right', '[class.mat-drawer-content-hidden]': '_shouldBeHidden()', }, - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [ { @@ -151,7 +149,6 @@ export class MatDrawerContent extends CdkScrollable implements AfterContentInit // reference. Updates tabIndex of drawer/container to default to null if in side mode. '[attr.tabIndex]': '(mode !== "side") ? "-1" : null', }, - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkScrollable], }) @@ -665,7 +662,6 @@ export class MatDrawer implements AfterViewInit, OnDestroy { 'class': 'mat-drawer-container', '[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride', }, - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [ { diff --git a/src/material/sidenav/sidenav.ts b/src/material/sidenav/sidenav.ts index 2c9cc1a94736..29d3b43fb575 100644 --- a/src/material/sidenav/sidenav.ts +++ b/src/material/sidenav/sidenav.ts @@ -7,7 +7,6 @@ */ import { - ChangeDetectionStrategy, Component, ContentChild, ContentChildren, @@ -30,7 +29,6 @@ import {CdkScrollable} from '@angular/cdk/scrolling'; host: { 'class': 'mat-drawer-content mat-sidenav-content', }, - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [ { @@ -60,7 +58,6 @@ export class MatSidenavContent extends MatDrawerContent {} '[style.top.px]': 'fixedInViewport ? fixedTopGap : null', '[style.bottom.px]': 'fixedInViewport ? fixedBottomGap : null', }, - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [CdkScrollable], providers: [{provide: MatDrawer, useExisting: MatSidenav}], @@ -112,7 +109,6 @@ export class MatSidenav extends MatDrawer { 'class': 'mat-drawer-container mat-sidenav-container', '[class.mat-drawer-container-explicit-backdrop]': '_backdropOverride', }, - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [ { From 75f5c2ee85ffb954f564f173693327c442f6e54e Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:02:36 +0200 Subject: [PATCH 39/49] refactor(material/slide-toggle): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/slide-toggle/slide-toggle.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/material/slide-toggle/slide-toggle.ts b/src/material/slide-toggle/slide-toggle.ts index 66bb0586db8c..281bd5bedd52 100644 --- a/src/material/slide-toggle/slide-toggle.ts +++ b/src/material/slide-toggle/slide-toggle.ts @@ -9,7 +9,6 @@ import { AfterContentInit, booleanAttribute, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, @@ -76,7 +75,6 @@ export class MatSlideToggleChange { }, exportAs: 'matSlideToggle', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, providers: [ { provide: NG_VALUE_ACCESSOR, From d540c5df361b39fc954cd8f27532d664b8effff9 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:02:40 +0200 Subject: [PATCH 40/49] refactor(material/slider): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/slider/slider-thumb.ts | 2 -- src/material/slider/slider.ts | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/material/slider/slider-thumb.ts b/src/material/slider/slider-thumb.ts index 4ed7c0ef34d2..74d32c2dc410 100644 --- a/src/material/slider/slider-thumb.ts +++ b/src/material/slider/slider-thumb.ts @@ -8,7 +8,6 @@ import { AfterViewInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, @@ -45,7 +44,6 @@ import {Platform} from '@angular/cdk/platform'; host: { 'class': 'mdc-slider__thumb mat-mdc-slider-visual-thumb', }, - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{provide: MAT_SLIDER_VISUAL_THUMB, useExisting: MatSliderVisualThumb}], imports: [MatRipple], diff --git a/src/material/slider/slider.ts b/src/material/slider/slider.ts index 104ede8c6966..12f8e52e009f 100644 --- a/src/material/slider/slider.ts +++ b/src/material/slider/slider.ts @@ -12,7 +12,6 @@ import { afterRenderEffect, AfterViewInit, booleanAttribute, - ChangeDetectionStrategy, ChangeDetectorRef, Component, computed, @@ -74,7 +73,6 @@ import {_CdkPrivateStyleLoader} from '@angular/cdk/private'; '[class._mat-animation-noopable]': '_noopAnimations', }, exportAs: 'matSlider', - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [{provide: MAT_SLIDER, useExisting: MatSlider}], imports: [MatSliderVisualThumb], From 2fb694cf7a8fe90a77e5d83b4e80827e5ec50d6b Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:02:44 +0200 Subject: [PATCH 41/49] refactor(material/snack-bar): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/snack-bar/simple-snack-bar.ts | 3 +-- src/material/snack-bar/snack-bar.spec.ts | 1 - src/material/snack-bar/snack-bar.zone.spec.ts | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/material/snack-bar/simple-snack-bar.ts b/src/material/snack-bar/simple-snack-bar.ts index b005fba0deaf..0bc617374fba 100644 --- a/src/material/snack-bar/simple-snack-bar.ts +++ b/src/material/snack-bar/simple-snack-bar.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, ViewEncapsulation, inject} from '@angular/core'; +import {Component, ViewEncapsulation, inject} from '@angular/core'; import {MatButton} from '../button'; import {MatSnackBarRef} from './snack-bar-ref'; import {MAT_SNACK_BAR_DATA} from './snack-bar-config'; @@ -28,7 +28,6 @@ export interface TextOnlySnackBar { styleUrl: 'simple-snack-bar.css', exportAs: 'matSnackBar', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButton, MatSnackBarLabel, MatSnackBarActions, MatSnackBarAction], host: { 'class': 'mat-mdc-simple-snack-bar', diff --git a/src/material/snack-bar/snack-bar.spec.ts b/src/material/snack-bar/snack-bar.spec.ts index c80c19fdfbe1..fdc3b659849e 100644 --- a/src/material/snack-bar/snack-bar.spec.ts +++ b/src/material/snack-bar/snack-bar.spec.ts @@ -976,7 +976,6 @@ class DirectiveWithViewContainer { selector: 'arbitrary-component', template: `@if (childComponentExists()) {}`, imports: [DirectiveWithViewContainer], - changeDetection: ChangeDetectionStrategy.OnPush, }) class ComponentWithChildViewContainer { @ViewChild(DirectiveWithViewContainer) childWithViewContainer!: DirectiveWithViewContainer; diff --git a/src/material/snack-bar/snack-bar.zone.spec.ts b/src/material/snack-bar/snack-bar.zone.spec.ts index 8f652ada82e5..9e1a21e04093 100644 --- a/src/material/snack-bar/snack-bar.zone.spec.ts +++ b/src/material/snack-bar/snack-bar.zone.spec.ts @@ -1,5 +1,4 @@ import { - ChangeDetectionStrategy, Component, Directive, ViewChild, @@ -69,7 +68,6 @@ class DirectiveWithViewContainer { selector: 'arbitrary-component', template: `@if (childComponentExists()) {}`, imports: [DirectiveWithViewContainer], - changeDetection: ChangeDetectionStrategy.OnPush, }) class ComponentWithChildViewContainer { @ViewChild(DirectiveWithViewContainer) childWithViewContainer!: DirectiveWithViewContainer; From eadd9523ac2cc6f952f04b62778bb0b2b5dd56fe Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:02:49 +0200 Subject: [PATCH 42/49] refactor(material/sort): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/sort/sort-header.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/material/sort/sort-header.ts b/src/material/sort/sort-header.ts index 97488960b6e5..ec1ee5d15fb1 100644 --- a/src/material/sort/sort-header.ts +++ b/src/material/sort/sort-header.ts @@ -10,7 +10,6 @@ import {AriaDescriber, FocusMonitor} from '@angular/cdk/a11y'; import {ENTER, SPACE} from '@angular/cdk/keycodes'; import { AfterViewInit, - ChangeDetectionStrategy, Component, ElementRef, Input, @@ -59,7 +58,6 @@ import {_animationsDisabled, _StructuralStylesLoader} from '../core'; '[class.mat-sort-header-disabled]': '_isDisabled()', }, encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatSortHeader implements MatSortable, OnDestroy, OnInit, AfterViewInit { protected _sort = inject(MatSort, {optional: true})!; From 7ea79619cefa9853fdf6706f5e45768e9ae7cb9a Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:02:53 +0200 Subject: [PATCH 43/49] refactor(material/stepper): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/stepper/step-header.ts | 2 -- src/material/stepper/stepper.ts | 3 --- 2 files changed, 5 deletions(-) diff --git a/src/material/stepper/step-header.ts b/src/material/stepper/step-header.ts index 189ecacd8071..d6a39d4dfc56 100644 --- a/src/material/stepper/step-header.ts +++ b/src/material/stepper/step-header.ts @@ -8,7 +8,6 @@ import {FocusMonitor, FocusOrigin} from '@angular/cdk/a11y'; import { - ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, @@ -39,7 +38,6 @@ import {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/privat 'role': '', // ignore cdk role in favor of setting appropriately in html }, encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatRipple, NgTemplateOutlet, MatIcon], }) export class MatStepHeader extends CdkStepHeader implements AfterViewInit, OnDestroy { diff --git a/src/material/stepper/stepper.ts b/src/material/stepper/stepper.ts index c6635e9c5ed9..edf98e72b2db 100644 --- a/src/material/stepper/stepper.ts +++ b/src/material/stepper/stepper.ts @@ -10,7 +10,6 @@ import {CdkStep, CdkStepper} from '@angular/cdk/stepper'; import { AfterContentInit, AfterViewInit, - ChangeDetectionStrategy, Component, ContentChild, ContentChildren, @@ -52,7 +51,6 @@ import {MatStepContent} from './step-content'; ], encapsulation: ViewEncapsulation.None, exportAs: 'matStep', - changeDetection: ChangeDetectionStrategy.OnPush, imports: [CdkPortalOutlet], host: { 'hidden': '', // Hide the steps so they don't affect the layout. @@ -134,7 +132,6 @@ export class MatStep extends CdkStep implements ErrorStateMatcher, AfterContentI }, providers: [{provide: CdkStepper, useExisting: MatStepper}], encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, MatStepHeader], }) export class MatStepper extends CdkStepper implements AfterViewInit, AfterContentInit, OnDestroy { From 98489e321389c477e032711078efaecb21ccc4aa Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:02:57 +0200 Subject: [PATCH 44/49] refactor(material/tabs): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/tabs/tab-nav-bar/tab-nav-bar.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/material/tabs/tab-nav-bar/tab-nav-bar.ts b/src/material/tabs/tab-nav-bar/tab-nav-bar.ts index a61c8acd939c..33ead35c9f85 100644 --- a/src/material/tabs/tab-nav-bar/tab-nav-bar.ts +++ b/src/material/tabs/tab-nav-bar/tab-nav-bar.ts @@ -246,7 +246,6 @@ export class MatTabNav extends MatPaginatedTabHeader implements AfterContentInit @Component({ selector: '[mat-tab-link], [matTabLink]', exportAs: 'matTabLink', - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, templateUrl: 'tab-link.html', styleUrl: 'tab-link.css', @@ -436,7 +435,6 @@ export class MatTabLink 'role': 'tabpanel', }, encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class MatTabNavPanel { /** Unique id for the tab panel. */ From a4beafe2c469e3ba1d1180e94cec3efb2e7ec871 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:03:02 +0200 Subject: [PATCH 45/49] refactor(material/timepicker): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/timepicker/timepicker-toggle.ts | 2 -- src/material/timepicker/timepicker.ts | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/material/timepicker/timepicker-toggle.ts b/src/material/timepicker/timepicker-toggle.ts index bd2bbcbd1cc1..0fcd14c9740e 100644 --- a/src/material/timepicker/timepicker-toggle.ts +++ b/src/material/timepicker/timepicker-toggle.ts @@ -8,7 +8,6 @@ import { booleanAttribute, - ChangeDetectionStrategy, Component, computed, HostAttributeToken, @@ -36,7 +35,6 @@ import type {MatTimepicker} from './timepicker'; }, exportAs: 'matTimepickerToggle', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatIconButton], }) export class MatTimepickerToggle { diff --git a/src/material/timepicker/timepicker.ts b/src/material/timepicker/timepicker.ts index 3feafc30d24a..83df2e3f90aa 100644 --- a/src/material/timepicker/timepicker.ts +++ b/src/material/timepicker/timepicker.ts @@ -10,7 +10,6 @@ import { afterNextRender, AfterRenderRef, booleanAttribute, - ChangeDetectionStrategy, Component, computed, effect, @@ -116,7 +115,6 @@ export interface MatTimepickerConnectedInput { exportAs: 'matTimepicker', templateUrl: 'timepicker.html', styleUrl: 'timepicker.css', - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [MatOption], providers: [ From 67f89316985708e26785459d04e2dd9296076fc4 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:03:06 +0200 Subject: [PATCH 46/49] refactor(material/toolbar): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/toolbar/toolbar.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/material/toolbar/toolbar.ts b/src/material/toolbar/toolbar.ts index 6e9b55d3898e..deae512e6f12 100644 --- a/src/material/toolbar/toolbar.ts +++ b/src/material/toolbar/toolbar.ts @@ -10,7 +10,6 @@ import {Platform} from '@angular/cdk/platform'; import { AfterViewInit, - ChangeDetectionStrategy, Component, ContentChildren, Directive, @@ -40,7 +39,6 @@ export class MatToolbarRow {} '[class.mat-toolbar-multiple-rows]': '_toolbarRows.length > 0', '[class.mat-toolbar-single-row]': '_toolbarRows.length === 0', }, - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) export class MatToolbar implements AfterViewInit { From 6c723d83a60ac03149146015e6b457c3aeb7112f Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:03:10 +0200 Subject: [PATCH 47/49] refactor(material/tooltip): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/material/tooltip/tooltip.spec.ts | 1 - src/material/tooltip/tooltip.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/material/tooltip/tooltip.spec.ts b/src/material/tooltip/tooltip.spec.ts index 248555811dab..14d35e112833 100644 --- a/src/material/tooltip/tooltip.spec.ts +++ b/src/material/tooltip/tooltip.spec.ts @@ -1607,7 +1607,6 @@ class ScrollableTooltipDemo { [matTooltipPosition]="position"> Button `, - changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatTooltipModule, OverlayModule], }) class OnPushTooltipDemo { diff --git a/src/material/tooltip/tooltip.ts b/src/material/tooltip/tooltip.ts index 4c15b145e839..e6d9a41eb346 100644 --- a/src/material/tooltip/tooltip.ts +++ b/src/material/tooltip/tooltip.ts @@ -15,7 +15,6 @@ import { import {ESCAPE, hasModifierKey} from '@angular/cdk/keycodes'; import { AfterViewInit, - ChangeDetectionStrategy, ChangeDetectorRef, Component, Directive, @@ -961,7 +960,6 @@ export class MatTooltip implements OnDestroy, AfterViewInit { templateUrl: 'tooltip.html', styleUrl: 'tooltip.css', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, host: { '(mouseleave)': '_handleMouseLeave($event)', 'aria-hidden': 'true', From 62656c9360488b55e3125f31c7a9e4be5baebfa9 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Thu, 7 May 2026 13:03:15 +0200 Subject: [PATCH 48/49] refactor(youtube-player): remove explicit change detection Now that `OnPush` is the default, we can remove it from the metadata. --- src/youtube-player/youtube-player-placeholder.ts | 3 +-- src/youtube-player/youtube-player.ts | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/youtube-player/youtube-player-placeholder.ts b/src/youtube-player/youtube-player-placeholder.ts index 34dc53733f90..d2cd5ab0560d 100644 --- a/src/youtube-player/youtube-player-placeholder.ts +++ b/src/youtube-player/youtube-player-placeholder.ts @@ -6,14 +6,13 @@ * found in the LICENSE file at https://angular.dev/license */ -import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core'; +import {Component, Input, ViewEncapsulation} from '@angular/core'; /** Quality of the placeholder image. */ export type PlaceholderImageQuality = 'high' | 'standard' | 'low'; @Component({ selector: 'youtube-player-placeholder', - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: `