<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅 Oh hi there! 😄 To expedite issue processing please search open and closed issues before submitting a new one. Existing issues often contain information about workarounds, resolution, or progress updates. 🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅--> # 🐞 Bug report ### Command (mark with an `x`) <!-- Can you pin-point the command or commands that are effected by this bug? --> <!-- ✍️edit: --> - [ ] new - [ ] build - [ ] serve - [ ] test - [ ] e2e - [x] generate - [ ] add - [ ] update - [ ] lint - [ ] extract-i18n - [ ] run - [ ] config - [ ] help - [ ] version - [ ] doc ### Is this a regression? <!-- Did this behavior use to work in the previous version? --> <!-- ✍️--> No ### Description <!-- ✍️--> Using `ng g component --changeDetection=OnPush` the imports are not being alphabetically imported ## 🔬 Minimal Reproduction <!-- Simple steps to reproduce this bug. Please include: commands run (including args), packages added, related code changes. If reproduction steps are not enough for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue. A good way to make a minimal reproduction is to create a new app via `ng new repro-app` and add the minimum possible code to show the problem. Share the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior. Issues that don't have enough info and can't be reproduced will be closed. You can read more about issue submission guidelines here: https://github.com/angular/angular-cli/blob/main/CONTRIBUTING.md#-submitting-an-issue --> * run `ng g component --changeDetection=OnPush` * The generated component (ts file) is generated like this:  * But it should be like this, to be alphabetically ordered:  ## 🔥 Exception or Error <pre><code> <!-- If the issue is accompanied by an exception or an error, please share it below: --> <!-- ✍️--> </code></pre> ## 🌍 Your Environment  <!-- run `ng version` and paste output below --> <!-- ✍️--> </code></pre> **Anything else relevant?** <!-- ✍️Is this a browser specific issue? If so, please specify the browser and version. --> <!-- ✍️Do any of these matter: operating system, IDE, package manager, HTTP server, ...? If so, please mention it below. -->