Skip to content

CLI: [command new] add option to enable previous suffix generation on create #30594

Closed

Description

@giacomo

Which @angular/* package(s) are relevant/related to the feature request?

compiler-cli

Description

The problem:

Starting in Angular v20, by default Angular CLI will not generate suffixes

As written in https://blog.angular.dev/announcing-angular-v20-b5c9c06cf301

Starting in Angular v20, by default Angular CLI will not generate suffixes for your components, directives, services, and pipes. For existing projects, ng update will enable suffix generation by updating your angular.json. To enable suffix generation in new projects, use the following schematic configuration:

{
  "projects": {
    "app": {
      ...
      "schematics": {
        "@schematics/angular:component": { "type": "component" },
        "@schematics/angular:directive": { "type": "directive" },
        "@schematics/angular:service": { "type": "service" },
        "@schematics/angular:guard": { "typeSeparator": "." },
        "@schematics/angular:interceptor": { "typeSeparator": "." },
        "@schematics/angular:module": { "typeSeparator": "." },
        "@schematics/angular:pipe": { "typeSeparator": "." },
        "@schematics/angular:resolver": { "typeSeparator": "." }
      },
  ...
}

Proposed solution

The solution:

To add an option to the new command, to be able to create a new application with suffixes:

ng new angular-app --with-suffix

This command will automatically add schematics to the angular.json and creates e.g. app.component.ts instead off app.ts

Alternatives considered

The only way to achive this, add manually the schematics and rename the auto generated files manually.
This is time consuming.

Activity

  1. transferred this issue fromangular/angularon Jun 25, 2025
  2. angular-robot commented on Jun 25, 2025

    @angular-robot
    Contributor

    This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.

    You can find more details about the feature request process in our documentation.

  3. jacsamg commented on Jun 25, 2025

    @jacsamg

    This is very necessary 🙏🏾

  4. Echarnus commented on Jun 25, 2025

    @Echarnus

    Makes it easy to identify files within a project. Have an upvote!

  5. andlewis commented on Jun 25, 2025

    @andlewis

    Seems like a good option to me!

  6. haimyul commented on Jun 25, 2025

    @haimyul

    I like this feature request!

  7. thibaut-st commented on Jun 25, 2025

    @thibaut-st

    The damage control feature.

  8. thischarmingsam8 commented on Jun 25, 2025

    @thischarmingsam8

    Removing the suffixes increases ambiguity, opinionated defaults are a key reason people choose Angular.

  9. ducthang-vu commented on Jun 25, 2025

    @ducthang-vu

    Removing the suffixes in the first place was completely unnecessary.

  10. added
    feature: under considerationFeature request for which voting has completed and the request is now under consideration
    and removed
    feature: votes requiredFeature request which is currently still in the voting phase
    on Jun 26, 2025
  11. 31 remaining items

  12. Milldrew commented on Aug 7, 2025

    @Milldrew

    Am i talking to myself?

    Is it not obvious that suffix is a misnomer?

    @giacomo where did this suffix name come from?

    It is certainly wrong and inaccurate.

    replace suffix with sub-filetype and we are somewhat on track.

    Besides the sub-filetypes should have never been removed. They prevent name space collisions among many other benefits that should be obvious. I am refraining from saying anything that will get this comment censored.

    Love to see you all here trying to get things on track! 🙏🏻

  13. thibaut-st commented on Aug 7, 2025

    @thibaut-st

    Am i talking to myself?

    Apparently since most people calls it suffix for years now.

  14. giacomo commented on Aug 9, 2025

    @giacomo
    Author

    @francoqueirolo great seem not so complex your purpose. I hope the angular team finds the right solution it is annoing to rename all files created by new projects.

  15. srquev commented on Aug 10, 2025

    @srquev

    I noticed that the Angular CLI no longer automatically appends the Component suffix when generating new components, a feature that existed in earlier versions. This change impacts consistency and clarity in component naming across projects.

    Please revert it to avoid confusion between components and other classes or files. For example, a file named model.ts might be mistaken for an interface or data model file rather than a component. Appending Component makes the purpose explicit.

  16. added 7 commits that reference this issue on Aug 27, 2025
    dc65b3a
    fc4a07e
    2fd9912
    6fa0a72
    869420a
    78d88bc
    f85ac76
  17. added a commit that references this issue on Sep 2, 2025
    4e6c94f
  18. angular-automatic-lock-bot commented on Oct 3, 2025

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  19. locked and limited conversation to collaborators on Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: @schematics/angularfeatureLabel used to distinguish feature request from other issuesfeature: under considerationFeature request for which voting has completed and the request is now under consideration

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions