Skip to content

refactor(app): standalone conversion — zero NgModules#147

Merged
gkbishnoi07 merged 2 commits into
angular-zard-migrationfrom
feat/standalone-conversion
Jul 9, 2026
Merged

refactor(app): standalone conversion — zero NgModules#147
gkbishnoi07 merged 2 commits into
angular-zard-migrationfrom
feat/standalone-conversion

Conversation

@gkbishnoi07

Copy link
Copy Markdown

Stacked on #146 (Angular 16→20). Converts the entire application to standalone — zero NgModules remain.

What was done

  1. Official Angular migration (ng generate @angular/core:standalone), per the standalone migration guide, in its three modes in order:
    • convert declarations (97 components/directives/pipes → standalone with their own imports)
    • prune NgModules
    • standalone bootstrap (AppModule deleted, bootstrapApplication in main.ts)
  2. Manual conversion of the infrastructure the schematic leaves behind:
    • AppRoutingModuleapp.routes.ts + provideRouter(appRoutes, withHashLocation())
    • CoreModule.forRoot() → root providers in main.ts + provideHttpClient(withInterceptorsFromDi())
    • InventoryModule/RxModule (+ routing modules) → inventory.routes.ts / rx.routes.ts via loadChildren; their services are provided at the root (not route-level) so they remain app-wide singletons and stay resolvable inside dialog-opened components
  3. @angular-eslint/prefer-standalone re-enabled (satisfied now); migration output prettier-formatted.

SonarCloud

This PR removes all 97 S7648 findings flagged on #146 (standalone: false is gone entirely).

Verification

build-dev ✅ · build-prod ✅ · lint ✅ (0 errors) · lazy loading for inventory/rx preserved · zero behavior change

Run the official Angular standalone migration (ng generate
@angular/core:standalone) in its three modes: convert declarations, prune
NgModules, standalone bootstrap. Then convert the remaining infrastructure by
hand:

- AppModule/AppRoutingModule -> bootstrapApplication + app.routes.ts with
  provideRouter(withHashLocation)
- CoreModule.forRoot() providers -> root providers in main.ts, plus
  provideHttpClient(withInterceptorsFromDi)
- InventoryModule/RxModule + their routing modules -> inventory.routes.ts /
  rx.routes.ts loaded via loadChildren; their providers move to the root so
  they stay app-wide singletons and remain resolvable inside dialog-opened
  components
- re-enable the @angular-eslint/prefer-standalone rule (now satisfied)
- prettier-format the migration output

Zero NgModules remain. build-dev, build-prod and lint verified green.
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f3bb0d80-0e32-42e3-8cfa-bf81fd060752

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Jul 5, 2026

Copy link
Copy Markdown

@gkbishnoi07
gkbishnoi07 deleted the branch angular-zard-migration July 9, 2026 06:08
@gkbishnoi07 gkbishnoi07 closed this Jul 9, 2026
@gkbishnoi07 gkbishnoi07 reopened this Jul 9, 2026
@gkbishnoi07
gkbishnoi07 changed the base branch from feat/angular-16-to-20-upgrade to angular-zard-migration July 9, 2026 06:10
@gkbishnoi07
gkbishnoi07 merged commit 0d7f7bb into angular-zard-migration Jul 9, 2026
5 checks passed
@gkbishnoi07
gkbishnoi07 deleted the feat/standalone-conversion branch July 9, 2026 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants