Skip to content

Commit 53ada26

Browse files
committed
fix(@schematics/angular): replace deprecated ChangeDetectionStrategy.Default with Eager
Updates the component schematic to use `ChangeDetectionStrategy.Eager` as the default strategy and updates the allowed enum values in the schema, as `ChangeDetectionStrategy.Default` is now deprecated.
1 parent af2c7e9 commit 53ada26

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/schematics/angular/component/index_spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ describe('Component Schematic', () => {
2323
inlineStyle: false,
2424
inlineTemplate: false,
2525
displayBlock: false,
26-
changeDetection: ChangeDetection.Default,
26+
changeDetection: ChangeDetection.Eager,
2727
style: Style.Css,
2828
type: 'Component',
2929
skipTests: false,

packages/schematics/angular/component/schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@
6565
},
6666
"changeDetection": {
6767
"description": "Configures the change detection strategy for the component.",
68-
"enum": ["Default", "OnPush"],
68+
"enum": ["Eager", "OnPush"],
6969
"type": "string",
70-
"default": "Default",
70+
"default": "Eager",
7171
"alias": "c"
7272
},
7373
"prefix": {

0 commit comments

Comments
 (0)