Skip to content

Dot "typeSeparator" is ignored on module generation #31686

@Quentigus

Description

@Quentigus

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

Hi

Inside a module-based application, generated with latest Angular CLI.

When old naming convention is configured (with angular.json configuration or with type-sperator passed to the command), ng g m is still generating a file with - type separator.

Used angular.json configuration ;

 "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": "."
    }
  }

Minimal Reproduction

  • Generate module-based application
  • Add angular.json configuration (see above)
  • Generate a module

or

  • Generate module-based application
  • Generate a module with ng g m --type-separator=.

Exception or Error


Your Environment

Angular CLI: 20.3.8
Node: 22.16.0
Package Manager: npm 10.9.2
OS: win32 x64

Angular: 20.3.9
... common, compiler, compiler-cli, core, forms
... platform-browser, router

Package                      Version
------------------------------------
@angular-devkit/architect    0.2003.8
@angular-devkit/core         20.3.8
@angular-devkit/schematics   20.3.8
@angular/build               20.3.8
@angular/cli                 20.3.8
@schematics/angular          20.3.8
rxjs                         7.8.2
typescript                   5.9.3
zone.js                      0.15.1

Anything else relevant?

No response

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