Angular Standard¶
v1.0 — 2026-06-06 — applies to Reporting.UI, KIPS, ArtLiftService.UI and new Angular apps.
Versions & stack¶
- Floor for active development: Angular 20. ArtLiftService.UI (v17) upgrades at next milestone; PropertyTaxManagement.UI.2.0 (v13) is frozen legacy.
- DECISION: New apps use PrimeNG + TailwindCSS v4 (the Reporting.UI/KIPS direction). Material remains only in existing apps.
- Tailwind v4 is CSS-first (
@import "tailwindcss",@theme) — notailwind.config.jsin new projects.
Modern Angular (the rewritten official style guide)¶
The angular.dev style guide was rewritten — old conventions are legacy. For all NEW code:
- Standalone components only; no NgModules.
- No type suffixes:
user-profile.ts/ classUserProfile— notuser-profile.component.ts/UserProfileComponent. Existing code keeps its names; don't mass-rename. inject()instead of constructor injection.- Signals for local synchronous state;
computed()instead of complex template logic; signal-basedinput()/output()/model()markedreadonly. - RxJS for async streams.
toPromise()is removed in RxJS 8 — usefirstValueFrom/lastValueFrom(ArtLiftService.UI and Reporting.UI containtoPromise()calls; migrate when touched). - Organize by feature area, not by type (
features/invoicing/, notcomponents/+services/). - Functional guards/interceptors/resolvers (class-based deprecated).
- Native
class/stylebindings overNgClass/NgStyle. Handlers named for what they do (saveUser(), nothandleClick()).
Performance (items 28–30, accepted 2026-06-06)¶
- Bundle budgets enforced in CI: Angular's built-in
budgetsinangular.json(initial bundle + per-component styles) tuned per app and failing the production build on regression — the coverage-gate philosophy applied to bytes. - Core Web Vitals targets at p75: LCP < 2.5 s, INP < 200 ms, CLS < 0.1.
- JS discipline: lazy-loaded routes by default;
@deferfor below-the-fold and heavy widgets (charts, maps); import-on-interaction for expensive third-party components. - Images:
NgOptimizedImagewith explicit dimensions; AVIF/WebP formats.
Tooling¶
- 2-space indent, LF, single quotes, Prettier default printWidth 80 (ratified — frontend does NOT follow the C# 180 rule) — Prettier formats, angular-eslint lints; both run in CI (
prettier --check,ng lint). - TypeScript
strict: true. Noanyin new code — useunknown+ narrowing or proper types. - GraphQL via Apollo Angular with generated types (codegen) — no hand-written response interfaces.
Sources: Angular style guide · Signals · toPromise deprecation · angular-eslint · Tailwind v4 upgrade