Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 15 tasks
eltonc-dev opened this issue May 17, 2022 · 1 comment · Fixed by #23159

Comments

@eltonc-dev
Copy link
Contributor

🐞 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?

@ngbot ngbot bot modified the milestone: needsTriage May 17, 2022
eltonc-dev pushed a commit to eltonc-dev/angular-cli that referenced this issue May 18, 2022
…ration

change the order of imports during component generation using changeDetectionStrategy set to OnPush

closes [angular#23156](angular#23156 (comment))
eltonc-dev added a commit to eltonc-dev/angular-cli that referenced this issue May 18, 2022
…ration

change the order of imports during component generation using changeDetectionStrategy set to OnPush

closes angular#23156
eltonc-dev added a commit to eltonc-dev/angular-cli that referenced this issue May 18, 2022
…nt generation

change the order of imports during component generation using changeDetectionStrategy set to OnPush

closes angular#23156
clydin pushed a commit that referenced this issue May 18, 2022
…nt generation

change the order of imports during component generation using changeDetectionStrategy set to OnPush

closes #23156
clydin pushed a commit that referenced this issue May 18, 2022
…nt generation

change the order of imports during component generation using changeDetectionStrategy set to OnPush

closes #23156

(cherry picked from commit d899091)
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.