-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Command
new
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When generating a new project, an App component is created with inconsistent templates, depending on whether you use internal or external templates.
When you use ng new -t (inline template), the default h1 contains Welcome to {{ title() }}!:
Line 8 in aef7d65
<h1>Welcome to {{ title() }}!</h1> Line 6 in aef7d65
<h1>Welcome to {{ title() }}!</h1>
When you use ng new (external template file), the default h1 contains Hello, {{ title() }}:
Line 233 in aef7d65
<h1>Hello, {{ title() }}</h1>
When I add Cypress using ng e2e, it will create this default assertion: cy.contains('app is running') . This assertion fails when you use inline templates.
The inline and external default templates should be consistent in my opinion, so external tooling can assert on it.
Minimal Reproduction
When you use ng new -t (inline template), the default h1 contains Welcome to {{ title() }}!:
Line 8 in aef7d65
<h1>Welcome to {{ title() }}!</h1> Line 6 in aef7d65
<h1>Welcome to {{ title() }}!</h1>
When you use ng new (external template file), the default h1 contains Hello, {{ title() }}:
Line 233 in aef7d65
<h1>Hello, {{ title() }}</h1>
Exception or Error
Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI : 21.0.4
Node.js : 22.21.1
Package Manager : npm 10.9.4
Operating System : win32 x64
Anything else relevant?
No response