refactor(app): standalone conversion — zero NgModules#147
Conversation
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.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|



Stacked on #146 (Angular 16→20). Converts the entire application to standalone — zero NgModules remain.
What was done
ng generate @angular/core:standalone), per the standalone migration guide, in its three modes in order:imports)AppModuledeleted,bootstrapApplicationinmain.ts)AppRoutingModule→app.routes.ts+provideRouter(appRoutes, withHashLocation())CoreModule.forRoot()→ root providers inmain.ts+provideHttpClient(withInterceptorsFromDi())InventoryModule/RxModule(+ routing modules) →inventory.routes.ts/rx.routes.tsvialoadChildren; their services are provided at the root (not route-level) so they remain app-wide singletons and stay resolvable inside dialog-opened components@angular-eslint/prefer-standalonere-enabled (satisfied now); migration output prettier-formatted.SonarCloud
This PR removes all 97 S7648 findings flagged on #146 (
standalone: falseis gone entirely).Verification
build-dev✅ ·build-prod✅ ·lint✅ (0 errors) · lazy loading forinventory/rxpreserved · zero behavior change