Skip to content

## Title: Angular CLI 20.x generates confusing filenames and disables default naming conventions #30609

Closed as duplicate of#30594
@niraj125

Description

@niraj125

Command

generate

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

In Angular CLI v20+, I observed a major regression from a developer UX point of view.

When creating a component using:

ng g c test-component


The generated files are:

test-component.ts
test-component.html
test-component.css

Expected:

test-component.component.ts
test-component.component.html
test-component.component.css

Why It’s a Problem:
File naming becomes inconsistent and unclear.

Standard naming like .component.ts, .service.ts, etc., helps in readability, maintainability, and avoids confusion.

Many devs (especially those migrating from Angular 12–15) face this issue.

Angular documentation doesn’t clearly explain why this change was made or how to revert properly.

Suggested Solution:
Either revert to standard .component.ts naming.

Or clearly document the reason and provide a --classic-naming flag.

Let users choose naming conventions during ng new.

Exception or Error


### Your Environment

```text
Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.2000.4
@angular-devkit/core         20.0.4
@angular-devkit/schematics   20.0.4
@angular/build               20.0.4
@angular/cli                 20.0.4
@schematics/angular          20.0.4
rxjs                         7.8.2
typescript                   5.8.3
zone.js                      0.15.1

Anything else relevant?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions