Standalone components, signals for state, strict templates, lazy routes.
Constitution — Angular enterprise app
Version 1.0.0 · Ratified 2026-11-10
These principles hold for every spec, plan and task of the project. A spec may add rules; it never weakens these.
-
Standalone components. Every component, directive and pipe is standalone and imports what it uses. No new
NgModuleis added. -
Signals for state. Component state uses
signal,computedandinput(). RxJS stays for streams of events and is turned into signals withtoSignal; a manualsubscribewithouttakeUntilDestroyedfails the review. -
Strict templates.
strictandstrictTemplatesare on intsconfig.json, so a type error in a template fails the build. No$any()in templates. -
Lazy routes. Every feature is loaded with
loadComponentorloadChildren. Theinitialbudget inangular.jsonis an error above 500 kB, so the build fails when it grows past it. -
OnPush everywhere. Every component uses
ChangeDetectionStrategy.OnPush. A component that only works with default change detection is a defect. -
Dependencies through injection. Services are obtained with
inject()and provided inrootor in route providers. Creating a service withnewfails the review. -
Typed reactive forms. Forms are typed
FormGroupandFormControlwith validators next to them. Untyped forms and template-driven forms for business data are not used. -
Tested and accessible. Components are tested through their template with Angular Testing Library, and the
@angular-eslint/templateaccessibility rules run as errors. The suite is green before the merge.