Skip to content

Commit 9e5ae4b

Browse files
SkyZeroZxatscott
authored andcommitted
test(core): remove redundant change detection configuration
OnPush is now the default change detection strategy, so the explicit test and example configuration is no longer needed.
1 parent 4380e68 commit 9e5ae4b

2 files changed

Lines changed: 1 addition & 11 deletions

File tree

packages/core/test/linker/view_injector_integration_spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import {expect} from '@angular/private/testing/matchers';
1010
import {
1111
Attribute,
12-
ChangeDetectionStrategy,
1312
ChangeDetectorRef,
1413
Component,
1514
createComponent as coreCreateComponent,
@@ -248,7 +247,6 @@ class DirectiveNeedsChangeDetectorRef {
248247
@Component({
249248
selector: '[componentNeedsChangeDetectorRef]',
250249
template: '{{counter}}',
251-
changeDetection: ChangeDetectionStrategy.OnPush,
252250
standalone: false,
253251
})
254252
class PushComponentNeedsChangeDetectorRef {

packages/examples/core/ts/change_detect/change-detection.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,13 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.dev/license
77
*/
8-
import {
9-
ChangeDetectionStrategy,
10-
ChangeDetectorRef,
11-
Component,
12-
effect,
13-
input,
14-
signal,
15-
} from '@angular/core';
8+
import {ChangeDetectorRef, Component, effect, input, signal} from '@angular/core';
169
import {FormsModule} from '@angular/forms';
1710

1811
// #docregion mark-for-check
1912
@Component({
2013
selector: 'app-root',
2114
template: `Number of ticks: {{ numberOfTicks }}`,
22-
changeDetection: ChangeDetectionStrategy.OnPush,
2315
})
2416
class AppComponent {
2517
numberOfTicks = 0;

0 commit comments

Comments
 (0)