Skip to content

Commit d49f888

Browse files
committed
refactor(material/schematics): drop standalone flag from schematics
since v19 Angular components are standalone by default so we don't have to add `standalone` flag to be true explicitly in schematics
1 parent 6a48ffd commit d49f888

File tree

10 files changed

+0
-15
lines changed

10 files changed

+0
-15
lines changed

src/material/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import { FormBuilder, Validators } from '@angular/forms';
2222
styleUrl: './<%= dasherize(name) %>.component.<%= style %>'<% } %><% if(!!viewEncapsulation) { %>,
2323
encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
2424
changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %><% if(standalone) { %>,
25-
standalone: true,
2625
imports: [
2726
MatInputModule,
2827
MatButtonModule,

src/material/schematics/ng-generate/address-form/index.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ describe('Material address-form schematic', () => {
7474
});
7575

7676
expect(module).not.toContain('FooComponent');
77-
expect(content).toContain('standalone: true');
7877
expect(content).toContain('imports: [');
7978
});
8079

@@ -84,7 +83,6 @@ describe('Material address-form schematic', () => {
8483
const component = getFileContent(tree, '/projects/material/src/app/foo/foo.component.ts');
8584

8685
expect(tree.exists('/projects/material/src/app/app.module.ts')).toBe(false);
87-
expect(component).toContain('standalone: true');
8886
expect(component).toContain('imports: [');
8987
});
9088
});

src/material/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { MatCardModule } from '@angular/material/card';<% } %>
2020
styleUrl: './<%= dasherize(name) %>.component.<%= style %>'<% } %><% if(!!viewEncapsulation) { %>,
2121
encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
2222
changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %><% if(standalone) { %>,
23-
standalone: true,
2423
imports: [
2524
AsyncPipe,
2625
MatGridListModule,

src/material/schematics/ng-generate/dashboard/index.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ describe('material-dashboard-schematic', () => {
7878
});
7979

8080
expect(module).not.toContain('FooComponent');
81-
expect(component).toContain('standalone: true');
8281
expect(component).toContain('imports: [');
8382
});
8483

@@ -91,7 +90,6 @@ describe('material-dashboard-schematic', () => {
9190
);
9291

9392
expect(tree.exists('/projects/material/src/app/app.module.ts')).toBe(false);
94-
expect(componentContent).toContain('standalone: true');
9593
expect(componentContent).toContain('imports: [');
9694
});
9795
});

src/material/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { map, shareReplay } from 'rxjs/operators';
2121
styleUrl: './<%= dasherize(name) %>.component.<%= style %>'<% } %><% if(!!viewEncapsulation) { %>,
2222
encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
2323
changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %><% if(standalone) { %>,
24-
standalone: true,
2524
imports: [
2625
MatToolbarModule,
2726
MatButtonModule,

src/material/schematics/ng-generate/navigation/index.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ describe('material-navigation-schematic', () => {
8989
});
9090

9191
expect(module).not.toContain('FooComponent');
92-
expect(component).toContain('standalone: true');
9392
expect(component).toContain('imports: [');
9493
});
9594

@@ -102,7 +101,6 @@ describe('material-navigation-schematic', () => {
102101
);
103102

104103
expect(tree.exists('/projects/material/src/app/app.module.ts')).toBe(false);
105-
expect(componentContent).toContain('standalone: true');
106104
expect(componentContent).toContain('imports: [');
107105
});
108106
});

src/material/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { <%= classify(name) %>DataSource, <%= classify(name) %>Item } from './<%
1616
styleUrl: './<%= dasherize(name) %>.component.<%= style %>'<% } %><% if(!!viewEncapsulation) { %>,
1717
encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
1818
changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %><% if(standalone) { %>,
19-
standalone: true,
2019
imports: [MatTableModule, MatPaginatorModule, MatSortModule]<% } %>
2120
})
2221
export class <%= classify(name) %>Component implements AfterViewInit {

src/material/schematics/ng-generate/table/index.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ describe('material-table-schematic', () => {
8484
});
8585

8686
expect(module).not.toContain('FooComponent');
87-
expect(component).toContain('standalone: true');
8887
expect(component).toContain('imports: [');
8988
});
9089

@@ -97,7 +96,6 @@ describe('material-table-schematic', () => {
9796
);
9897

9998
expect(tree.exists('/projects/material/src/app/app.module.ts')).toBe(false);
100-
expect(componentContent).toContain('standalone: true');
10199
expect(componentContent).toContain('imports: [');
102100
});
103101
});

src/material/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export interface FlatTreeNode {
3535
styleUrl: './<%= dasherize(name) %>.component.<%= style %>'<% } %><% if(!!viewEncapsulation) { %>,
3636
encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
3737
changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %><% if(standalone) { %>,
38-
standalone: true,
3938
imports: [MatTreeModule, MatButtonModule, MatIconModule]<% } %>
4039
})
4140
export class <%= classify(name) %>Component {

src/material/schematics/ng-generate/tree/index.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ describe('Material tree schematic', () => {
6262
});
6363

6464
expect(module).not.toContain('FooComponent');
65-
expect(component).toContain('standalone: true');
6665
expect(component).toContain('imports: [');
6766
});
6867

@@ -75,7 +74,6 @@ describe('Material tree schematic', () => {
7574
);
7675

7776
expect(tree.exists('/projects/material/src/app/app.module.ts')).toBe(false);
78-
expect(componentContent).toContain('standalone: true');
7977
expect(componentContent).toContain('imports: [');
8078
});
8179
});

0 commit comments

Comments
 (0)