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, 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 { 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 {} 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': ''}, 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 {} 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', encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, }) export class CdkStep implements OnChanges { private _stepperOptions: StepperOptions; 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 { 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 = ''; 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': ''}, 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, }) 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: '
', 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', }, 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: [ 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 = 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() { 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 {} 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 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], }) 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: '', 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 { 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 { 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. */ 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. 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}, 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 { 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); 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 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 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: { 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 @@ -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', 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: [ { 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, 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], 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; 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})!; 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 { 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. */ 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: [ 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 { 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', 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: `