Skip to content

Support Angular 21's new template file naming convention (xxx.component.html => xxx.html) #18665

@bastibense

Description

@bastibense

I just migrated my Angular project's file naming to the new naming conventions.

Basically the new conventions allow template file to drop the component part in the file name.
So you'll end up with a template file called users.html and not users.component.html.

What I noticed is, that prettier assumes I'm editing a normal HTML file instead of an Angular template file. So no formatting for @case, etc, happens.

Maybe there is a way for prettier to support the "non-component" file names as well? It would be pretty annoying to have to rename a template file to contain "component" in the file name, save file to reformat, then rename it back.

EDIT: Reference
https://angular.dev/style-guide#naming

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