From 93076bea1a625a7a26b706b1fe35b8ac99e134fe Mon Sep 17 00:00:00 2001
From: Charles Lyding <19598772+clydin@users.noreply.github.com>
Date: Mon, 7 Apr 2025 15:50:43 -0400
Subject: [PATCH 1/2] fix(@schematics/angular): default component templates to
not use `.ng.html` extension
To align with recent changes to the updated style guide, Angular v20 will now
generate component templates without a `.ng.html` file extension and instead use
the previous `.html` by default. The `--ng-html` option is still available for use if
the `.ng.html` extension is preferred in projects.
---
.../{app.ng.html.template => app.html.template} | 0
.../files/module-files/src/app/app.ts.template | 2 +-
.../files/standalone-files/src/app/app.ts.template | 2 +-
packages/schematics/angular/application/index.ts | 2 +-
.../schematics/angular/application/index_spec.ts | 14 +++++++-------
.../schematics/angular/component/index_spec.ts | 6 +++---
packages/schematics/angular/component/schema.json | 4 ++--
packages/schematics/angular/module/index_spec.ts | 6 +++---
8 files changed, 18 insertions(+), 18 deletions(-)
rename packages/schematics/angular/application/files/common-files/src/app/{app.ng.html.template => app.html.template} (100%)
diff --git a/packages/schematics/angular/application/files/common-files/src/app/app.ng.html.template b/packages/schematics/angular/application/files/common-files/src/app/app.html.template
similarity index 100%
rename from packages/schematics/angular/application/files/common-files/src/app/app.ng.html.template
rename to packages/schematics/angular/application/files/common-files/src/app/app.html.template
diff --git a/packages/schematics/angular/application/files/module-files/src/app/app.ts.template b/packages/schematics/angular/application/files/module-files/src/app/app.ts.template
index df7e3d72767f..ca94fc7bb99a 100644
--- a/packages/schematics/angular/application/files/module-files/src/app/app.ts.template
+++ b/packages/schematics/angular/application/files/module-files/src/app/app.ts.template
@@ -9,7 +9,7 @@ import { Component } from '@angular/core';
%> <%
} %>
`,<% } else { %>
- templateUrl: './app.ng.html',<% } %>
+ templateUrl: './app.html',<% } %>
standalone: false,<% if(inlineStyle) { %>
styles: []<% } else { %>
styleUrl: './app.<%= style %>'<% } %>
diff --git a/packages/schematics/angular/application/files/standalone-files/src/app/app.ts.template b/packages/schematics/angular/application/files/standalone-files/src/app/app.ts.template
index 72ba48ff0ce6..74ea464e5d04 100644
--- a/packages/schematics/angular/application/files/standalone-files/src/app/app.ts.template
+++ b/packages/schematics/angular/application/files/standalone-files/src/app/app.ts.template
@@ -11,7 +11,7 @@ import { RouterOutlet } from '@angular/router';<% } %>
%> <%
} %>
`,<% } else { %>
- templateUrl: './app.ng.html',<% } if(inlineStyle) { %>
+ templateUrl: './app.html',<% } if(inlineStyle) { %>
styles: [],<% } else { %>
styleUrl: './app.<%= style %>'<% } %>
})
diff --git a/packages/schematics/angular/application/index.ts b/packages/schematics/angular/application/index.ts
index 55a26b243ec6..2273afc311b1 100644
--- a/packages/schematics/angular/application/index.ts
+++ b/packages/schematics/angular/application/index.ts
@@ -84,7 +84,7 @@ export default function (options: ApplicationOptions): Rule {
? filter((path) => !path.endsWith('tsconfig.spec.json.template'))
: noop(),
componentOptions.inlineTemplate
- ? filter((path) => !path.endsWith('.ng.html.template'))
+ ? filter((path) => !path.endsWith('app.html.template'))
: noop(),
applyTemplates({
utils: strings,
diff --git a/packages/schematics/angular/application/index_spec.ts b/packages/schematics/angular/application/index_spec.ts
index 036ef03f0ce7..5f51ba33d01c 100644
--- a/packages/schematics/angular/application/index_spec.ts
+++ b/packages/schematics/angular/application/index_spec.ts
@@ -56,7 +56,7 @@ describe('Application Schematic', () => {
'/projects/foo/src/styles.css',
'/projects/foo/src/app/app.module.ts',
'/projects/foo/src/app/app.css',
- '/projects/foo/src/app/app.ng.html',
+ '/projects/foo/src/app/app.html',
'/projects/foo/src/app/app.spec.ts',
'/projects/foo/src/app/app.ts',
]),
@@ -266,7 +266,7 @@ describe('Application Schematic', () => {
'/src/main.ts',
'/src/styles.css',
'/src/app/app.css',
- '/src/app/app.ng.html',
+ '/src/app/app.html',
'/src/app/app.spec.ts',
'/src/app/app.ts',
]),
@@ -447,7 +447,7 @@ describe('Application Schematic', () => {
[
'/projects/foo/tsconfig.spec.json',
'/projects/foo/src/app/app.css',
- '/projects/foo/src/app/app.ng.html',
+ '/projects/foo/src/app/app.html',
'/projects/foo/src/app/app.spec.ts',
].forEach((x) => expect(files).not.toContain(x));
@@ -472,7 +472,7 @@ describe('Application Schematic', () => {
'/projects/foo/tsconfig.spec.json',
'/projects/foo/karma.conf.js',
'/projects/foo/src/test.ts',
- '/projects/foo/src/app/app.ng.html',
+ '/projects/foo/src/app/app.html',
'/projects/foo/src/app/app.spec.ts',
].forEach((x) => expect(files).not.toContain(x));
@@ -509,7 +509,7 @@ describe('Application Schematic', () => {
'/projects/foo/src/index.html',
'/projects/foo/src/main.ts',
'/projects/foo/src/styles.css',
- '/projects/foo/src/app/app.ng.html',
+ '/projects/foo/src/app/app.html',
'/projects/foo/src/app/app.ts',
]),
);
@@ -531,7 +531,7 @@ describe('Application Schematic', () => {
'/projects/foo/src/styles.css',
'/projects/foo/src/app/app.config.ts',
'/projects/foo/src/app/app.css',
- '/projects/foo/src/app/app.ng.html',
+ '/projects/foo/src/app/app.html',
'/projects/foo/src/app/app.spec.ts',
'/projects/foo/src/app/app.ts',
]),
@@ -672,7 +672,7 @@ describe('Application Schematic', () => {
'/projects/foo/src/app/app-routing.module.ts',
'/projects/foo/src/app/app.module.ts',
'/projects/foo/src/app/app.css',
- '/projects/foo/src/app/app.ng.html',
+ '/projects/foo/src/app/app.html',
'/projects/foo/src/app/app.spec.ts',
'/projects/foo/src/app/app.ts',
]),
diff --git a/packages/schematics/angular/component/index_spec.ts b/packages/schematics/angular/component/index_spec.ts
index a1b31c294fbb..a9298d578753 100644
--- a/packages/schematics/angular/component/index_spec.ts
+++ b/packages/schematics/angular/component/index_spec.ts
@@ -310,13 +310,13 @@ describe('Component Schematic', () => {
expect(tree.files).toContain('/projects/bar/src/app/foo/foo.component.ng.html');
});
- it('should use `.ng.html` extension when ngHtml is not present', async () => {
+ it('should not use `.ng.html` extension when ngHtml is not present', async () => {
const options = { ...defaultOptions, ngHtml: undefined };
const tree = await schematicRunner.runSchematic('component', options, appTree);
const content = tree.readContent('/projects/bar/src/app/foo/foo.component.ts');
- expect(content).toContain('foo.component.ng.html');
+ expect(content).toContain('foo.component.html');
expect(tree.files).toContain('/projects/bar/src/app/foo/foo.component.css');
- expect(tree.files).toContain('/projects/bar/src/app/foo/foo.component.ng.html');
+ expect(tree.files).toContain('/projects/bar/src/app/foo/foo.component.html');
});
it('should create the right selector with a path in the name', async () => {
diff --git a/packages/schematics/angular/component/schema.json b/packages/schematics/angular/component/schema.json
index d292a46f35ff..dfbc702f451e 100644
--- a/packages/schematics/angular/component/schema.json
+++ b/packages/schematics/angular/component/schema.json
@@ -137,8 +137,8 @@
},
"ngHtml": {
"type": "boolean",
- "default": true,
- "description": "Generate component template files with an '.ng.html' file extension instead of '.html'. The '.ng.html' file extension is recommended by the Angular style guide."
+ "default": false,
+ "description": "Generate component template files with an '.ng.html' file extension instead of '.html'."
}
},
"required": ["name", "project"]
diff --git a/packages/schematics/angular/module/index_spec.ts b/packages/schematics/angular/module/index_spec.ts
index 6bb319654c78..614d73b7139c 100644
--- a/packages/schematics/angular/module/index_spec.ts
+++ b/packages/schematics/angular/module/index_spec.ts
@@ -153,7 +153,7 @@ describe('Module Schematic', () => {
'/projects/bar/src/app/foo/foo.module.ts',
'/projects/bar/src/app/foo/foo-routing.module.ts',
'/projects/bar/src/app/foo/foo.ts',
- '/projects/bar/src/app/foo/foo.ng.html',
+ '/projects/bar/src/app/foo/foo.html',
'/projects/bar/src/app/foo/foo.css',
]),
);
@@ -203,7 +203,7 @@ describe('Module Schematic', () => {
expect(files).toContain('/projects/bar/src/app/foo/foo.module.ts');
expect(files).not.toContain('/projects/bar/src/app/foo/foo-routing.module.ts');
expect(files).toContain('/projects/bar/src/app/foo/foo.ts');
- expect(files).toContain('/projects/bar/src/app/foo/foo.ng.html');
+ expect(files).toContain('/projects/bar/src/app/foo/foo.html');
expect(files).toContain('/projects/bar/src/app/foo/foo.css');
const appModuleContent = tree.readContent('/projects/bar/src/app/app.module.ts');
@@ -231,7 +231,7 @@ describe('Module Schematic', () => {
'/projects/bar/src/app/foo.module.ts',
'/projects/bar/src/app/foo-routing.module.ts',
'/projects/bar/src/app/foo.ts',
- '/projects/bar/src/app/foo.ng.html',
+ '/projects/bar/src/app/foo.html',
'/projects/bar/src/app/foo.css',
]),
);
From bd2846501d5dcbf4e850886eeee4b7e6ef245402 Mon Sep 17 00:00:00 2001
From: Charles Lyding <19598772+clydin@users.noreply.github.com>
Date: Mon, 7 Apr 2025 16:03:57 -0400
Subject: [PATCH 2/2] test: update E2E tests to account for the `.html`
template extension
Effectively reverts commit 770b993c5656c9436b420002edab178d14e278f6
while accounting for the `.component` change.
---
tests/legacy-cli/e2e/tests/basic/rebuild.ts | 2 +-
.../tests/build/app-shell/app-shell-with-schematic.ts | 2 +-
.../build/app-shell/app-shell-with-service-worker.ts | 2 +-
tests/legacy-cli/e2e/tests/build/library/setup.ts | 4 ++--
.../e2e/tests/build/prerender/error-with-sourcemaps.ts | 2 +-
...erver-routes-output-mode-server-platform-neutral.ts | 2 +-
.../e2e/tests/generate/component/component-basic.ts | 2 +-
.../tests/generate/component/component-child-dir.ts | 2 +-
.../e2e/tests/generate/component/component-flat.ts | 2 +-
.../generate/component/component-inline-template.ts | 4 +---
.../e2e/tests/generate/component/component-not-flat.ts | 2 +-
.../tests/generate/component/component-path-case.ts | 4 ++--
.../e2e/tests/generate/generate-name-check.ts | 2 +-
.../e2e/tests/i18n/extract-ivy-disk-cache.ts | 2 +-
.../legacy-cli/e2e/tests/i18n/extract-ivy-libraries.ts | 4 ++--
tests/legacy-cli/e2e/tests/i18n/extract-ivy.ts | 2 +-
.../i18n/ivy-localize-app-shell-service-worker.ts | 2 +-
.../e2e/tests/i18n/ivy-localize-app-shell.ts | 8 ++++----
tests/legacy-cli/e2e/tests/i18n/setup.ts | 10 +++++-----
tests/legacy-cli/e2e/tests/misc/browsers.ts | 2 +-
tests/legacy-cli/e2e/tests/vite/ssr-entry-express.ts | 4 ++--
tests/legacy-cli/e2e/tests/vite/ssr-entry-fastify.ts | 4 ++--
tests/legacy-cli/e2e/tests/vite/ssr-entry-h3.ts | 4 ++--
tests/legacy-cli/e2e/tests/vite/ssr-entry-hono.ts | 4 ++--
tests/legacy-cli/e2e/tests/vite/ssr-with-ssl.ts | 2 +-
25 files changed, 39 insertions(+), 41 deletions(-)
diff --git a/tests/legacy-cli/e2e/tests/basic/rebuild.ts b/tests/legacy-cli/e2e/tests/basic/rebuild.ts
index 677f6b06f38e..d7c75cce9fc5 100644
--- a/tests/legacy-cli/e2e/tests/basic/rebuild.ts
+++ b/tests/legacy-cli/e2e/tests/basic/rebuild.ts
@@ -83,7 +83,7 @@ export default async function () {
await Promise.all([
waitForAnyProcessOutputToMatch(validBundleRegEx),
writeMultipleFiles({
- 'src/app/app.ng.html': '
testingTESTING123 ',
+ 'src/app/app.html': 'testingTESTING123 ',
}),
]);
diff --git a/tests/legacy-cli/e2e/tests/build/app-shell/app-shell-with-schematic.ts b/tests/legacy-cli/e2e/tests/build/app-shell/app-shell-with-schematic.ts
index 9315304837d7..65f6fdb23c48 100644
--- a/tests/legacy-cli/e2e/tests/build/app-shell/app-shell-with-schematic.ts
+++ b/tests/legacy-cli/e2e/tests/build/app-shell/app-shell-with-schematic.ts
@@ -7,7 +7,7 @@ import { updateJsonFile } from '../../../utils/project';
const snapshots = require('../../../ng-snapshot/package.json');
export default async function () {
- await appendToFile('src/app/app.ng.html', ' ');
+ await appendToFile('src/app/app.html', ' ');
await ng('generate', 'app-shell', '--project', 'test-project');
const isSnapshotBuild = getGlobalVariable('argv')['ng-snapshots'];
diff --git a/tests/legacy-cli/e2e/tests/build/app-shell/app-shell-with-service-worker.ts b/tests/legacy-cli/e2e/tests/build/app-shell/app-shell-with-service-worker.ts
index 15bea76575dd..b69e28e9ea38 100644
--- a/tests/legacy-cli/e2e/tests/build/app-shell/app-shell-with-service-worker.ts
+++ b/tests/legacy-cli/e2e/tests/build/app-shell/app-shell-with-service-worker.ts
@@ -7,7 +7,7 @@ import { updateJsonFile } from '../../../utils/project';
const snapshots = require('../../../ng-snapshot/package.json');
export default async function () {
- await appendToFile('src/app/app.ng.html', ' ');
+ await appendToFile('src/app/app.html', ' ');
await ng('generate', 'service-worker', '--project', 'test-project');
await ng('generate', 'app-shell', '--project', 'test-project');
diff --git a/tests/legacy-cli/e2e/tests/build/library/setup.ts b/tests/legacy-cli/e2e/tests/build/library/setup.ts
index 13b658f345ba..bc67a5b1c6aa 100644
--- a/tests/legacy-cli/e2e/tests/build/library/setup.ts
+++ b/tests/legacy-cli/e2e/tests/build/library/setup.ts
@@ -6,13 +6,13 @@ export async function libraryConsumptionSetup(): Promise {
// Force an external template
await writeMultipleFiles({
- 'projects/my-lib/src/lib/my-lib.ng.html': `my-lib works!
`,
+ 'projects/my-lib/src/lib/my-lib.html': `my-lib works!
`,
'projects/my-lib/src/lib/my-lib.ts': `import { Component } from '@angular/core';
@Component({
standalone: true,
selector: 'lib-my-lib',
- templateUrl: './my-lib.ng.html',
+ templateUrl: './my-lib.html',
})
export class MyLibComponent {}`,
'./src/app/app.ts': `
diff --git a/tests/legacy-cli/e2e/tests/build/prerender/error-with-sourcemaps.ts b/tests/legacy-cli/e2e/tests/build/prerender/error-with-sourcemaps.ts
index c971f87c27d6..b7970cec4000 100644
--- a/tests/legacy-cli/e2e/tests/build/prerender/error-with-sourcemaps.ts
+++ b/tests/legacy-cli/e2e/tests/build/prerender/error-with-sourcemaps.ts
@@ -28,7 +28,7 @@ export default async function () {
selector: 'app-root',
standalone: true,
imports: [CommonModule, RouterOutlet],
- templateUrl: './app.ng.html',
+ templateUrl: './app.html',
styleUrls: ['./app.css']
})
export class App {
diff --git a/tests/legacy-cli/e2e/tests/build/server-rendering/server-routes-output-mode-server-platform-neutral.ts b/tests/legacy-cli/e2e/tests/build/server-rendering/server-routes-output-mode-server-platform-neutral.ts
index 991ade378dc7..130ade10ba9f 100644
--- a/tests/legacy-cli/e2e/tests/build/server-rendering/server-routes-output-mode-server-platform-neutral.ts
+++ b/tests/legacy-cli/e2e/tests/build/server-rendering/server-routes-output-mode-server-platform-neutral.ts
@@ -28,7 +28,7 @@ export default async function () {
await writeMultipleFiles({
// Replace the template of app.ng.html as it makes it harder to debug
- 'src/app/app.ng.html': ' ',
+ 'src/app/app.html': ' ',
'src/app/app.routes.ts': `
import { Routes } from '@angular/router';
import { Home } from './home/home';
diff --git a/tests/legacy-cli/e2e/tests/generate/component/component-basic.ts b/tests/legacy-cli/e2e/tests/generate/component/component-basic.ts
index ac86d5beb358..b87e6acad2bf 100644
--- a/tests/legacy-cli/e2e/tests/generate/component/component-basic.ts
+++ b/tests/legacy-cli/e2e/tests/generate/component/component-basic.ts
@@ -11,7 +11,7 @@ export default function () {
.then(() => expectFileToExist(componentDir))
.then(() => expectFileToExist(join(componentDir, 'test-component.ts')))
.then(() => expectFileToExist(join(componentDir, 'test-component.spec.ts')))
- .then(() => expectFileToExist(join(componentDir, 'test-component.ng.html')))
+ .then(() => expectFileToExist(join(componentDir, 'test-component.html')))
.then(() => expectFileToExist(join(componentDir, 'test-component.css')))
// Try to run the unit tests.
diff --git a/tests/legacy-cli/e2e/tests/generate/component/component-child-dir.ts b/tests/legacy-cli/e2e/tests/generate/component/component-child-dir.ts
index 3f8d74bf0c42..6c7dc7506bab 100644
--- a/tests/legacy-cli/e2e/tests/generate/component/component-child-dir.ts
+++ b/tests/legacy-cli/e2e/tests/generate/component/component-child-dir.ts
@@ -21,7 +21,7 @@ export default async function () {
const componentDirectory = join(childDirectory, 'test-component');
await expectFileToExist(join(componentDirectory, 'test-component.ts'));
await expectFileToExist(join(componentDirectory, 'test-component.spec.ts'));
- await expectFileToExist(join(componentDirectory, 'test-component.ng.html'));
+ await expectFileToExist(join(componentDirectory, 'test-component.html'));
await expectFileToExist(join(componentDirectory, 'test-component.css'));
// Ensure unit test execute and pass
diff --git a/tests/legacy-cli/e2e/tests/generate/component/component-flat.ts b/tests/legacy-cli/e2e/tests/generate/component/component-flat.ts
index c3c2b47556ca..4bdb101391fa 100644
--- a/tests/legacy-cli/e2e/tests/generate/component/component-flat.ts
+++ b/tests/legacy-cli/e2e/tests/generate/component/component-flat.ts
@@ -18,7 +18,7 @@ export default function () {
.then(() => expectFileToExist(appDir))
.then(() => expectFileToExist(join(appDir, 'test-component.ts')))
.then(() => expectFileToExist(join(appDir, 'test-component.spec.ts')))
- .then(() => expectFileToExist(join(appDir, 'test-component.ng.html')))
+ .then(() => expectFileToExist(join(appDir, 'test-component.html')))
.then(() => expectFileToExist(join(appDir, 'test-component.css')))
// Try to run the unit tests.
diff --git a/tests/legacy-cli/e2e/tests/generate/component/component-inline-template.ts b/tests/legacy-cli/e2e/tests/generate/component/component-inline-template.ts
index 3f8f8bb329d3..135b97c43fcb 100644
--- a/tests/legacy-cli/e2e/tests/generate/component/component-inline-template.ts
+++ b/tests/legacy-cli/e2e/tests/generate/component/component-inline-template.ts
@@ -20,9 +20,7 @@ export default function () {
.then(() => expectFileToExist(componentDir))
.then(() => expectFileToExist(join(componentDir, 'test-component.ts')))
.then(() => expectFileToExist(join(componentDir, 'test-component.spec.ts')))
- .then(() =>
- expectToFail(() => expectFileToExist(join(componentDir, 'test-component.ng.html'))),
- )
+ .then(() => expectToFail(() => expectFileToExist(join(componentDir, 'test-component.html'))))
.then(() => expectFileToExist(join(componentDir, 'test-component.css')))
// Try to run the unit tests.
diff --git a/tests/legacy-cli/e2e/tests/generate/component/component-not-flat.ts b/tests/legacy-cli/e2e/tests/generate/component/component-not-flat.ts
index ec2748b35424..eedc3926da89 100644
--- a/tests/legacy-cli/e2e/tests/generate/component/component-not-flat.ts
+++ b/tests/legacy-cli/e2e/tests/generate/component/component-not-flat.ts
@@ -19,7 +19,7 @@ export default function () {
.then(() => expectFileToExist(componentDir))
.then(() => expectFileToExist(join(componentDir, 'test-component.ts')))
.then(() => expectFileToExist(join(componentDir, 'test-component.spec.ts')))
- .then(() => expectFileToExist(join(componentDir, 'test-component.ng.html')))
+ .then(() => expectFileToExist(join(componentDir, 'test-component.html')))
.then(() => expectFileToExist(join(componentDir, 'test-component.css')))
// Try to run the unit tests.
diff --git a/tests/legacy-cli/e2e/tests/generate/component/component-path-case.ts b/tests/legacy-cli/e2e/tests/generate/component/component-path-case.ts
index 27aaaa901d89..63d08af7099d 100644
--- a/tests/legacy-cli/e2e/tests/generate/component/component-path-case.ts
+++ b/tests/legacy-cli/e2e/tests/generate/component/component-path-case.ts
@@ -16,7 +16,7 @@ export default async function () {
// Ensure component is created in the correct location relative to the workspace root
await expectFileToExist(join(componentDirectory, 'test-component.ts'));
await expectFileToExist(join(componentDirectory, 'test-component.spec.ts'));
- await expectFileToExist(join(componentDirectory, 'test-component.ng.html'));
+ await expectFileToExist(join(componentDirectory, 'test-component.html'));
await expectFileToExist(join(componentDirectory, 'test-component.css'));
// Generate another component
@@ -25,7 +25,7 @@ export default async function () {
// Ensure component is created in the correct location relative to the workspace root
await expectFileToExist(join(componentTwoDirectory, 'test-component-two.ts'));
await expectFileToExist(join(componentTwoDirectory, 'test-component-two.spec.ts'));
- await expectFileToExist(join(componentTwoDirectory, 'test-component-two.ng.html'));
+ await expectFileToExist(join(componentTwoDirectory, 'test-component-two.html'));
await expectFileToExist(join(componentTwoDirectory, 'test-component-two.css'));
// Ensure unit test execute and pass
diff --git a/tests/legacy-cli/e2e/tests/generate/generate-name-check.ts b/tests/legacy-cli/e2e/tests/generate/generate-name-check.ts
index f1e115dc719a..6fe89a58face 100644
--- a/tests/legacy-cli/e2e/tests/generate/generate-name-check.ts
+++ b/tests/legacy-cli/e2e/tests/generate/generate-name-check.ts
@@ -18,7 +18,7 @@ export default function () {
.then(() => expectFileToExist(compDir))
.then(() => expectFileToExist(join(compDir, 'test-component.ts')))
.then(() => expectFileToExist(join(compDir, 'test-component.spec.ts')))
- .then(() => expectFileToExist(join(compDir, 'test-component.ng.html')))
+ .then(() => expectFileToExist(join(compDir, 'test-component.html')))
.then(() => expectFileToExist(join(compDir, 'test-component.css')))
// Try to run the unit tests.
diff --git a/tests/legacy-cli/e2e/tests/i18n/extract-ivy-disk-cache.ts b/tests/legacy-cli/e2e/tests/i18n/extract-ivy-disk-cache.ts
index bb1f915040ab..e5a13de3c439 100644
--- a/tests/legacy-cli/e2e/tests/i18n/extract-ivy-disk-cache.ts
+++ b/tests/legacy-cli/e2e/tests/i18n/extract-ivy-disk-cache.ts
@@ -15,7 +15,7 @@ export default async function () {
// Setup an i18n enabled component
await ng('generate', 'component', 'i18n-test');
- await writeFile(join('src/app/i18n-test', 'i18n-test.ng.html'), 'Hello world
');
+ await writeFile(join('src/app/i18n-test', 'i18n-test.html'), 'Hello world
');
await writeFile(
'src/app/app.ts',
diff --git a/tests/legacy-cli/e2e/tests/i18n/extract-ivy-libraries.ts b/tests/legacy-cli/e2e/tests/i18n/extract-ivy-libraries.ts
index 66bec6217e60..a577a8c5e6a6 100644
--- a/tests/legacy-cli/e2e/tests/i18n/extract-ivy-libraries.ts
+++ b/tests/legacy-cli/e2e/tests/i18n/extract-ivy-libraries.ts
@@ -17,7 +17,7 @@ export default async function () {
await prependToFile('src/app/app.ts', `import { I18nLibTest } from 'i18n-lib-test';`);
await writeFile(
- 'src/app/app.ng.html',
+ 'src/app/app.html',
`
Hello world
@@ -35,7 +35,7 @@ export default async function () {
await ng('extract-i18n');
await expectFileToMatch('messages.xlf', 'Hello world');
await expectFileToMatch('messages.xlf', 'i18n-lib-test works!');
- await expectFileToMatch('messages.xlf', 'src/app/app.ng.html');
+ await expectFileToMatch('messages.xlf', 'src/app/app.html');
await expectFileToMatch('messages.xlf', 'projects/i18n-lib-test/src/lib/i18n-lib-test.ts');
await uninstallPackage('@angular/localize');
diff --git a/tests/legacy-cli/e2e/tests/i18n/extract-ivy.ts b/tests/legacy-cli/e2e/tests/i18n/extract-ivy.ts
index 5682355915ff..72af7f87e712 100644
--- a/tests/legacy-cli/e2e/tests/i18n/extract-ivy.ts
+++ b/tests/legacy-cli/e2e/tests/i18n/extract-ivy.ts
@@ -9,7 +9,7 @@ import { readNgVersion } from '../../utils/version';
export default async function () {
// Setup an i18n enabled component
await ng('generate', 'component', 'i18n-test');
- await writeFile(join('src/app/i18n-test', 'i18n-test.ng.html'), 'Hello world
');
+ await writeFile(join('src/app/i18n-test', 'i18n-test.html'), 'Hello world
');
// Actually use the generated component to ensure it is present in the application output
await writeFile(
'src/app/app.ts',
diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell-service-worker.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell-service-worker.ts
index 8123b6f1a663..b1568be95939 100644
--- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell-service-worker.ts
+++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell-service-worker.ts
@@ -17,7 +17,7 @@ export default async function () {
: readNgVersion();
});
- await appendToFile('src/app/app.ng.html', ' ');
+ await appendToFile('src/app/app.html', ' ');
// Add app-shell and service-worker
await silentNg('generate', 'app-shell');
diff --git a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts
index aee5afa0338b..cbabbae17140 100644
--- a/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts
+++ b/tests/legacy-cli/e2e/tests/i18n/ivy-localize-app-shell.ts
@@ -23,7 +23,7 @@ export default async function () {
: readNgVersion();
});
- await appendToFile('src/app/app.ng.html', ' ');
+ await appendToFile('src/app/app.html', ' ');
await ng('generate', 'app-shell', '--project', 'test-project');
if (isSnapshotBuild) {
@@ -62,7 +62,7 @@ export default async function () {
});
await writeFile(
- 'src/app/app-shell/app-shell.ng.html',
+ 'src/app/app-shell/app-shell.html',
'Hello i18n! ',
);
@@ -70,7 +70,7 @@ export default async function () {
// Extraction of i18n only works on browser targets.
// Let's add the same translation that there is in the app-shell
await writeFile(
- 'src/app/app.ng.html',
+ 'src/app/app.html',
'Hello i18n! ',
);
@@ -81,7 +81,7 @@ export default async function () {
// Clean up app.ng.html so that we can easily
// find the translation text
- await writeFile('src/app/app.ng.html', ' ');
+ await writeFile('src/app/app.html', ' ');
for (const { lang, translation } of langTranslations) {
if (lang != 'en-US') {
diff --git a/tests/legacy-cli/e2e/tests/i18n/setup.ts b/tests/legacy-cli/e2e/tests/i18n/setup.ts
index 73ca0a90b00a..30fdcee1d757 100644
--- a/tests/legacy-cli/e2e/tests/i18n/setup.ts
+++ b/tests/legacy-cli/e2e/tests/i18n/setup.ts
@@ -108,7 +108,7 @@ export async function setupI18nConfig() {
selector: 'app-root',
imports: [DatePipe, RouterOutlet],
standalone: true,
- templateUrl: './app.ng.html'
+ templateUrl: './app.html'
})
export class App {
constructor(@Inject(LOCALE_ID) public locale: string) { }
@@ -119,7 +119,7 @@ export async function setupI18nConfig() {
`,
);
await writeFile(
- `src/app/app.ng.html`,
+ `src/app/app.html`,
`
Hello {{ title }}!
{{ locale }}
@@ -140,7 +140,7 @@ export async function setupI18nConfig() {
Hello !
- src/app/app.ng.html
+ src/app/app.html
2,3
An introduction header for this sample
@@ -148,14 +148,14 @@ export async function setupI18nConfig() {
Updated
- src/app/app.ng.html
+ src/app/app.html
5,6
{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other { minutes ago}}
- src/app/app.ng.html
+ src/app/app.html
5,6
diff --git a/tests/legacy-cli/e2e/tests/misc/browsers.ts b/tests/legacy-cli/e2e/tests/misc/browsers.ts
index 90c803e3b24f..14c085abaac5 100644
--- a/tests/legacy-cli/e2e/tests/misc/browsers.ts
+++ b/tests/legacy-cli/e2e/tests/misc/browsers.ts
@@ -11,7 +11,7 @@ export default async function () {
}
// Workaround for https://github.com/angular/angular/issues/32192
- await replaceInFile('src/app/app.ng.html', /class="material-icons"/g, '');
+ await replaceInFile('src/app/app.html', /class="material-icons"/g, '');
await ng('build');
diff --git a/tests/legacy-cli/e2e/tests/vite/ssr-entry-express.ts b/tests/legacy-cli/e2e/tests/vite/ssr-entry-express.ts
index 60e0c63a7c5a..11cf671becbf 100644
--- a/tests/legacy-cli/e2e/tests/vite/ssr-entry-express.ts
+++ b/tests/legacy-cli/e2e/tests/vite/ssr-entry-express.ts
@@ -20,7 +20,7 @@ export default async function () {
await writeMultipleFiles({
// Replace the template of app.ng.html as it makes it harder to debug
- 'src/app/app.ng.html': ' ',
+ 'src/app/app.html': ' ',
'src/app/app.routes.ts': `
import { Routes } from '@angular/router';
import { Home } from './home/home';
@@ -94,7 +94,7 @@ export default async function () {
// Modify the home component and validate the change.
await modifyFileAndWaitUntilUpdated(
- 'src/app/home/home.ng.html',
+ 'src/app/home/home.html',
'home works',
'yay home works!!!',
true,
diff --git a/tests/legacy-cli/e2e/tests/vite/ssr-entry-fastify.ts b/tests/legacy-cli/e2e/tests/vite/ssr-entry-fastify.ts
index 92152f44a77e..c50e8c2200f6 100644
--- a/tests/legacy-cli/e2e/tests/vite/ssr-entry-fastify.ts
+++ b/tests/legacy-cli/e2e/tests/vite/ssr-entry-fastify.ts
@@ -21,7 +21,7 @@ export default async function () {
await writeMultipleFiles({
// Replace the template of app.ng.html as it makes it harder to debug
- 'src/app/app.ng.html': ' ',
+ 'src/app/app.html': ' ',
'src/app/app.routes.ts': `
import { Routes } from '@angular/router';
import { Home } from './home/home';
@@ -87,7 +87,7 @@ export default async function () {
// Modify the home component and validate the change.
await modifyFileAndWaitUntilUpdated(
- 'src/app/home/home.ng.html',
+ 'src/app/home/home.html',
'home works',
'yay home works!!!',
true,
diff --git a/tests/legacy-cli/e2e/tests/vite/ssr-entry-h3.ts b/tests/legacy-cli/e2e/tests/vite/ssr-entry-h3.ts
index 99bf3a02b5eb..4a4f91066000 100644
--- a/tests/legacy-cli/e2e/tests/vite/ssr-entry-h3.ts
+++ b/tests/legacy-cli/e2e/tests/vite/ssr-entry-h3.ts
@@ -21,7 +21,7 @@ export default async function () {
await writeMultipleFiles({
// Replace the template of app.ng.html as it makes it harder to debug
- 'src/app/app.ng.html': ' ',
+ 'src/app/app.html': ' ',
'src/app/app.routes.ts': `
import { Routes } from '@angular/router';
import { Home } from './home/home';
@@ -78,7 +78,7 @@ export default async function () {
// Modify the home component and validate the change.
await modifyFileAndWaitUntilUpdated(
- 'src/app/home/home.ng.html',
+ 'src/app/home/home.html',
'home works',
'yay home works!!!',
true,
diff --git a/tests/legacy-cli/e2e/tests/vite/ssr-entry-hono.ts b/tests/legacy-cli/e2e/tests/vite/ssr-entry-hono.ts
index 94ff1e323112..0b0b8220fe6b 100644
--- a/tests/legacy-cli/e2e/tests/vite/ssr-entry-hono.ts
+++ b/tests/legacy-cli/e2e/tests/vite/ssr-entry-hono.ts
@@ -21,7 +21,7 @@ export default async function () {
await writeMultipleFiles({
// Replace the template of app.ng.html as it makes it harder to debug
- 'src/app/app.ng.html': ' ',
+ 'src/app/app.html': ' ',
'src/app/app.routes.ts': `
import { Routes } from '@angular/router';
import { Home } from './home/home';
@@ -70,7 +70,7 @@ export default async function () {
// Modify the home component and validate the change.
await modifyFileAndWaitUntilUpdated(
- 'src/app/home/home.ng.html',
+ 'src/app/home/home.html',
'home works',
'yay home works!!!',
true,
diff --git a/tests/legacy-cli/e2e/tests/vite/ssr-with-ssl.ts b/tests/legacy-cli/e2e/tests/vite/ssr-with-ssl.ts
index 429296c6d059..c4c0fd34ec75 100644
--- a/tests/legacy-cli/e2e/tests/vite/ssr-with-ssl.ts
+++ b/tests/legacy-cli/e2e/tests/vite/ssr-with-ssl.ts
@@ -19,7 +19,7 @@ export default async function () {
await writeMultipleFiles({
// Replace the template of app.ng.html as it makes it harder to debug
- 'src/app/app.ng.html': ' ',
+ 'src/app/app.html': ' ',
'src/app/app.routes.ts': `
import { Routes } from '@angular/router';
import { Home } from './home/home';