Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
5ba800d
refactor(cdk-experimental/selection): remove explicit change detection
crisbeto May 7, 2026
469b3b4
refactor(cdk/dialog): remove explicit change detection
crisbeto May 7, 2026
b33614e
refactor(cdk/drag-drop): remove explicit change detection
crisbeto May 7, 2026
18480dd
refactor(cdk/overlay): remove explicit change detection
crisbeto May 7, 2026
68c08dc
refactor(cdk/private): remove explicit change detection
crisbeto May 7, 2026
2894acc
refactor(cdk/scrolling): remove explicit change detection
crisbeto May 7, 2026
4faf91c
refactor(cdk/stepper): remove explicit change detection
crisbeto May 7, 2026
a489241
refactor(cdk/table): remove explicit change detection
crisbeto May 7, 2026
0eaecda
refactor(cdk/testing): remove explicit change detection
crisbeto May 7, 2026
ec817a3
refactor(cdk/text-field): remove explicit change detection
crisbeto May 7, 2026
c31de49
refactor(google-maps): remove explicit change detection
crisbeto May 7, 2026
607e044
refactor(material-experimental/column-resize): remove explicit change…
crisbeto May 7, 2026
0345e7b
refactor(material-experimental/menubar): remove explicit change detec…
crisbeto May 7, 2026
ecf9485
refactor(material-experimental/selection): remove explicit change det…
crisbeto May 7, 2026
19af054
refactor(material/autocomplete): remove explicit change detection
crisbeto May 7, 2026
3f21e8f
refactor(material/badge): remove explicit change detection
crisbeto May 7, 2026
1dbb201
refactor(material/button-toggle): remove explicit change detection
crisbeto May 7, 2026
1df3061
refactor(material/button): remove explicit change detection
crisbeto May 7, 2026
8316671
refactor(material/card): remove explicit change detection
crisbeto May 7, 2026
287bcf0
refactor(material/checkbox): remove explicit change detection
crisbeto May 7, 2026
da496c3
refactor(material/chips): remove explicit change detection
crisbeto May 7, 2026
bbb2167
refactor(material/core): remove explicit change detection
crisbeto May 7, 2026
2bc3161
refactor(material/datepicker): remove explicit change detection
crisbeto May 7, 2026
70912bf
refactor(material/dialog): remove explicit change detection
crisbeto May 7, 2026
fcc06a6
refactor(material/divider): remove explicit change detection
crisbeto May 7, 2026
af7ef9c
refactor(material/expansion): remove explicit change detection
crisbeto May 7, 2026
ef137c4
refactor(material/form-field): remove explicit change detection
crisbeto May 7, 2026
59d5f37
refactor(material/grid-list): remove explicit change detection
crisbeto May 7, 2026
91cf004
refactor(material/icon): remove explicit change detection
crisbeto May 7, 2026
414297f
refactor(material/input): remove explicit change detection
crisbeto May 7, 2026
8ada30b
refactor(material/list): remove explicit change detection
crisbeto May 7, 2026
b66975e
refactor(material/menu): remove explicit change detection
crisbeto May 7, 2026
bd03e4c
refactor(material/paginator): remove explicit change detection
crisbeto May 7, 2026
05ecdb1
refactor(material/progress-bar): remove explicit change detection
crisbeto May 7, 2026
5ad8b2d
refactor(material/progress-spinner): remove explicit change detection
crisbeto May 7, 2026
5ca4baf
refactor(material/radio): remove explicit change detection
crisbeto May 7, 2026
ef2c034
refactor(material/select): remove explicit change detection
crisbeto May 7, 2026
362b938
refactor(material/sidenav): remove explicit change detection
crisbeto May 7, 2026
75f5c2e
refactor(material/slide-toggle): remove explicit change detection
crisbeto May 7, 2026
d540c5d
refactor(material/slider): remove explicit change detection
crisbeto May 7, 2026
2fb694c
refactor(material/snack-bar): remove explicit change detection
crisbeto May 7, 2026
eadd952
refactor(material/sort): remove explicit change detection
crisbeto May 7, 2026
7ea7961
refactor(material/stepper): remove explicit change detection
crisbeto May 7, 2026
98489e3
refactor(material/tabs): remove explicit change detection
crisbeto May 7, 2026
a4beafe
refactor(material/timepicker): remove explicit change detection
crisbeto May 7, 2026
67f8931
refactor(material/toolbar): remove explicit change detection
crisbeto May 7, 2026
6c723d8
refactor(material/tooltip): remove explicit change detection
crisbeto May 7, 2026
62656c9
refactor(youtube-player): remove explicit change detection
crisbeto May 7, 2026
58b87f8
build: update linting config
crisbeto May 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/cdk-experimental/selection/selection-column.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
OnDestroy,
OnInit,
ViewChild,
ChangeDetectionStrategy,
ViewEncapsulation,
inject,
} from '@angular/core';
Expand Down Expand Up @@ -54,7 +53,6 @@ import {CdkSelectAll} from './select-all';
</td>
</ng-container>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
imports: [
CdkColumnDef,
Expand Down
1 change: 0 additions & 1 deletion src/cdk/dialog/dialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,6 @@ class DirectiveWithViewContainer {
}

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
template: 'hello',
})
class ComponentWithOnPushViewContainer {
Expand Down
3 changes: 0 additions & 3 deletions src/cdk/drag-drop/directives/drop-list-shared.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down Expand Up @@ -5693,7 +5692,6 @@ class NestedDropListGroups {
class DropListOnNgContainer {}

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [CdkDropList, CdkDrag],
template: `
<div cdkDropList style="width: 100px; background: pink;">
Expand Down Expand Up @@ -5728,7 +5726,6 @@ class DraggableInDropZoneWithoutEvents {
</div>
`,
imports: [CdkDropList, CdkDrag],
changeDetection: ChangeDetectionStrategy.OnPush,
})
class WrappedDropContainerComponent {
@Input() items: string[] | undefined;
Expand Down
1 change: 0 additions & 1 deletion src/cdk/drag-drop/directives/standalone-drag.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1897,7 +1897,6 @@ class StandaloneDraggable {
}

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<div cdkDrag #dragElement style="width: 100px; height: 100px; background: red;"></div>
`,
Expand Down
2 changes: 0 additions & 2 deletions src/cdk/drag-drop/drag-drop-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import {
ChangeDetectionStrategy,
Component,
Service,
ListenerOptions,
Expand Down Expand Up @@ -46,7 +45,6 @@ const activeCapturingEventOptions = {
styleUrl: 'resets.css',
encapsulation: ViewEncapsulation.None,
template: '',
changeDetection: ChangeDetectionStrategy.OnPush,
host: {'cdk-drag-resets-container': ''},
})
export class _ResetsLoader {}
Expand Down
11 changes: 1 addition & 10 deletions src/cdk/overlay/overlay-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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': ''},
Expand Down
3 changes: 1 addition & 2 deletions src/cdk/private/visually-hidden/visually-hidden.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -17,6 +17,5 @@ import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/co
exportAs: 'cdkVisuallyHidden',
encapsulation: ViewEncapsulation.None,
template: '',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class _VisuallyHiddenLoader {}
2 changes: 0 additions & 2 deletions src/cdk/scrolling/virtual-scroll-viewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
afterNextRender,
ApplicationRef,
booleanAttribute,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
DestroyRef,
Expand Down Expand Up @@ -77,7 +76,6 @@ export const CDK_VIRTUAL_SCROLL_VIEWPORT = new InjectionToken<CdkVirtualScrollVi
'[class.cdk-virtual-scroll-orientation-vertical]': 'orientation !== "horizontal"',
},
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [
{
provide: CdkScrollable,
Expand Down
2 changes: 0 additions & 2 deletions src/cdk/stepper/stepper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {Direction, Directionality} from '../bidi';
import {ENTER, hasModifierKey, SPACE} from '../keycodes';
import {
AfterViewInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ContentChild,
Expand Down Expand Up @@ -107,7 +106,6 @@ export interface StepperOptions {
exportAs: 'cdkStep',
template: '<ng-template><ng-content/></ng-template>',
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CdkStep implements OnChanges {
private _stepperOptions: StepperOptions;
Expand Down
1 change: 0 additions & 1 deletion src/cdk/table/table.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3325,7 +3325,6 @@ class TableWithIndirectDescendantDefs {
</tr>
</table>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [CdkTableModule],
})
class NativeHtmlTableAppOnPush {
Expand Down
2 changes: 0 additions & 2 deletions src/cdk/testing/tests/test-main-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {ENTER} from '../../keycodes';
import {_supportsShadowDom} from '../../platform';
import {FormControl, FormsModule, ReactiveFormsModule} from '@angular/forms';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ElementRef,
Expand All @@ -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 {
Expand Down
4 changes: 1 addition & 3 deletions src/cdk/testing/tests/test-shadow-boundary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '<div class="in-the-shadows">Shadow 2</div>',
changeDetection: ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:validate-decorators
encapsulation: ViewEncapsulation.ShadowDom,
})
Expand All @@ -23,7 +22,6 @@ export class TestSubShadowBoundary {}
<div class="in-the-shadows">Shadow 1</div>
<test-sub-shadow-boundary></test-sub-shadow-boundary>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
// tslint:disable-next-line:validate-decorators
encapsulation: ViewEncapsulation.ShadowDom,
imports: [TestSubShadowBoundary],
Expand Down
3 changes: 1 addition & 2 deletions src/cdk/testing/tests/test-sub-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -18,7 +18,6 @@ import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@ang
}
</ul>`,
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class TestSubComponent {
@Input() title = '';
Expand Down
3 changes: 1 addition & 2 deletions src/cdk/text-field/text-field-style-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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': ''},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import {
AfterContentInit,
ChangeDetectionStrategy,
Component,
ContentChildren,
EventEmitter,
Expand Down Expand Up @@ -59,7 +58,6 @@ declare const MarkerClusterer: typeof MarkerClustererInstance;
@Component({
selector: 'deprecated-map-marker-clusterer',
exportAs: 'mapMarkerClusterer',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content/>',
encapsulation: ViewEncapsulation.None,
})
Expand Down
2 changes: 0 additions & 2 deletions src/google-maps/google-map/google-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import {
ChangeDetectionStrategy,
Component,
ElementRef,
Input,
Expand Down Expand Up @@ -53,7 +52,6 @@ export const DEFAULT_WIDTH = '500px';
@Component({
selector: 'google-map',
exportAs: 'googleMap',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<div class="map-container"></div><ng-content />',
encapsulation: ViewEncapsulation.None,
})
Expand Down
2 changes: 0 additions & 2 deletions src/google-maps/map-marker-clusterer/map-marker-clusterer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import {
ChangeDetectionStrategy,
Component,
ContentChildren,
EventEmitter,
Expand Down Expand Up @@ -48,7 +47,6 @@ declare const markerClusterer: {
@Component({
selector: 'map-marker-clusterer',
exportAs: 'mapMarkerClusterer',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content/>',
encapsulation: ViewEncapsulation.None,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ class MatResizeTest extends BaseTestComponent {

@Component({
template: getTableTemplate(false),
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [BidiModule, MatTableModule, MatColumnResizeModule],
})
class MatResizeOnPushTest extends MatResizeTest {}
Expand Down
2 changes: 0 additions & 2 deletions src/material-experimental/column-resize/overlay-handle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import {
ChangeDetectionStrategy,
Component,
ElementRef,
NgZone,
Expand Down Expand Up @@ -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: '<div #top class="mat-column-resize-overlay-thumb-top"></div>',
Expand Down
3 changes: 1 addition & 2 deletions src/material-experimental/menubar/menubar-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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',
Expand Down
3 changes: 1 addition & 2 deletions src/material-experimental/menubar/menubar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/**
Expand All @@ -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',
},
Expand Down
2 changes: 0 additions & 2 deletions src/material-experimental/selection/selection-column.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
OnDestroy,
OnInit,
ViewChild,
ChangeDetectionStrategy,
ViewEncapsulation,
inject,
} from '@angular/core';
Expand Down Expand Up @@ -57,7 +56,6 @@ import {MatSelectAll} from './select-all';
</td>
</ng-container>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
styleUrl: 'selection-column.css',
encapsulation: ViewEncapsulation.None,
imports: [
Expand Down
1 change: 0 additions & 1 deletion src/material/autocomplete/autocomplete.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4086,7 +4086,6 @@ class AutocompleteWithNumbers {
}

@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
template: `
<mat-form-field>
<input type="text" matInput [matAutocomplete]="auto">
Expand Down
2 changes: 0 additions & 2 deletions src/material/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import {
AfterContentInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ContentChildren,
Expand Down Expand Up @@ -104,7 +103,6 @@ export const MAT_AUTOCOMPLETE_DEFAULT_OPTIONS = new InjectionToken<MatAutocomple
templateUrl: 'autocomplete.html',
styleUrl: 'autocomplete.css',
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
exportAs: 'matAutocomplete',
host: {
'class': 'mat-mdc-autocomplete',
Expand Down
2 changes: 0 additions & 2 deletions src/material/badge/badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {_IdGenerator, AriaDescriber, InteractivityChecker} from '@angular/cdk/a1

import {
booleanAttribute,
ChangeDetectionStrategy,
Component,
Directive,
ElementRef,
Expand Down Expand Up @@ -51,7 +50,6 @@ const BADGE_CONTENT_CLASS = 'mat-badge-content';
styleUrl: 'badge.css',
encapsulation: ViewEncapsulation.None,
template: '',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class _MatBadgeStyleLoader {}

Expand Down
2 changes: 0 additions & 2 deletions src/material/button-toggle/button-toggle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
AfterContentInit,
AfterViewInit,
booleanAttribute,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ContentChildren,
Expand Down Expand Up @@ -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',
Expand Down
Loading
Loading