Skip to content

Commit fcf7443

Browse files
committed
fix(@schematics/angular): explicitly set standalone:false
1 parent 13b65df commit fcf7443

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

packages/schematics/angular/application/files/module-files/src/app/app.component.ts.template

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import { Component } from '@angular/core';
99
%><router-outlet /><%
1010
} %>
1111
`,<% } else { %>
12-
templateUrl: './app.component.html',<% } if(inlineStyle) { %>
12+
templateUrl: './app.component.html',<% } %>
13+
standalone: false,<% if(inlineStyle) { %>
1314
styles: []<% } else { %>
1415
styleUrl: './app.component.<%= style %>'<% } %>
1516
})

packages/schematics/angular/component/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import { <% if(changeDetection !== 'Default') { %>ChangeDetectionStrategy, <% }%
33
@Component({<% if(!skipSelector) {%>
44
selector: '<%= selector %>',<%}%><% if(standalone) {%>
55
standalone: true,
6-
imports: [],<%}%><% if(inlineTemplate) { %>
6+
imports: [],<%} else { %>
7+
standalone: false,
8+
<% }%><% if(inlineTemplate) { %>
79
template: `
810
<p>
911
<%= dasherize(name) %> works!

packages/schematics/angular/directive/files/__name@dasherize@if-flat__/__name@dasherize__.directive.ts.template

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { Directive } from '@angular/core';
22

33
@Directive({
44
selector: '[<%= selector %>]'<% if(standalone) {%>,
5-
standalone: true<%}%>
5+
standalone: true<%} else {%>,
6+
standalone: false<%}%>
67
})
78
export class <%= classify(name) %>Directive {
89

packages/schematics/angular/pipe/files/__name@dasherize@if-flat__/__name@dasherize__.pipe.ts.template

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { Pipe, PipeTransform } from '@angular/core';
22

33
@Pipe({
44
name: '<%= camelize(name) %>'<% if(standalone) {%>,
5-
standalone: true<%}%>
5+
standalone: true<%} else {%>,
6+
standalone: false<%}%>
67
})
78
export class <%= classify(name) %>Pipe implements PipeTransform {
89

tests/legacy-cli/e2e/tests/test/test-scripts.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default async function () {
1919
'src/app/app.component.ts': `
2020
import { Component } from '@angular/core';
2121
22-
@Component({ selector: 'app-root', template: '' })
22+
@Component({ selector: 'app-root', template: '', standalone: false })
2323
export class AppComponent {
2424
stringScriptGlobalProp = stringScriptGlobal;
2525
inputScriptGlobalProp = inputScriptGlobal;

0 commit comments

Comments
 (0)