Skip to content

ng generate incorrectly adds component to a module #10030

@DanielKucal

Description

@DanielKucal

Versions

Angular CLI: 1.7.2
Node: 7.7.4
OS: darwin x64
Angular: 5.2.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.7.2
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.1
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.5.3
webpack: 3.11.0

Repro steps

Observed behavior

Angular CLI misplaces component declaration, produces e.g.:

  declarations: [
    AppComponen,
    HomeComponentt,
  ],

Desired behavior

I would expect:

  declarations: [
    AppComponent,
    HomeComponent,
  ],

Mention any other details that might be useful (optional)

  • --lint-fix doesn't matter here
  • directory ("components/") doesn't matter as well

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions