Skip to content

imports are not being alphabetically ordered during components generation using ChangeDetectionStrategy set to onPush #23156

@eltonc-dev

Description

@eltonc-dev

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

No

Description

Using `ng g component --changeDetection=OnPush` the imports are not being alphabetically imported

🔬 Minimal Reproduction

  • run ng g component --changeDetection=OnPush
  • The generated component (ts file) is generated like this:
    Captura de Tela 2022-05-17 às 15 21 47
  • But it should be like this, to be alphabetically ordered:
    Captura de Tela 2022-05-17 às 15 22 15

🔥 Exception or Error





🌍 Your Environment

Captura de Tela 2022-05-17 às 15 29 53

Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions