angular-standards
Use when building Angular (v18/19+) apps in a touchstone repo — standalone components, signals, change detection, DI, routing, RxJS, forms, HttpClient, control flow, state. Triggers on *.component.ts, angular.json, `@angular/*` in package.json. Language-level TS rules live in the typescript skill; for React/Nuxt use those skills.
- License 许可
- MIT
- 最近更新
- 2026-08-26
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- angular-standards
- license
- MIT
- metadata
- { "author": "touchstone", "version": "0.2.0" }
- description
- Use when building Angular (v18/19+) apps in a touchstone repo — standalone components, signals, change detection, DI, routing, RxJS, forms, HttpClient, control flow, state. Triggers on *.component.ts, angular.json, `@angular/*` in package.json. Language-level TS rules live in the typescript skill; for React/Nuxt use those skills.
03 SKILL.md 正文
Angular (framework)
Full standard: standards/frameworks/angular.md (layers on standards/languages/typescript.md).
Load-bearing rules:
Always
- Standalone only — no new
NgModule; bootstrap withbootstrapApplication+ provider functions (provideRouter,provideHttpClient). - Signals are the primitive —
signal/computed/effect, andinput/output/model/viewChildover decorators; effects do side effects, never derive state. OnPushon every component; go zoneless on new apps; never calldetectChanges()to "fix" a view.inject()+providedIn: 'root'; functional guards/resolvers/interceptors (class-based are legacy); lazy-load every feature route.- Typed reactive forms (
nonNullable); type HTTP responses and Zod-parse at the boundary.
Don't get burned
- No bare
subscribe()withouttakeUntilDestroyed()(orAsyncPipe/toSignal) — it leaks. Signals for state, RxJS for event/async streams. @forneedstrackby stable id, never$index; use built-in@if/@for/@switchand@deferfor heavy blocks.- No secrets in
environment.ts— it ships plaintext. Migrate off Karma/Protractor (Jest/Vitest + Testing Library + Playwright).
Done
no new NgModule · standalone + signals + OnPush · takeUntilDestroyed on subscriptions · esbuild builder + budgets · a11y/tests green. See standards/frameworks/angular.md.
04 同仓库更多 Skills
ok-standards
Use when writing shell, per standards/languages/shell.md.
demo-standards
Use when editing demo code in a touchstone fixture repo, a deliberately ordinary description that is long enough to clear the forty character minimum.
demo-standards
Use when editing demo code in a touchstone fixture repo, a deliberately ordinary description that is long enough to clear the forty character minimum.
demo-standards
Use when editing demo code in a touchstone fixture repo, a deliberately ordinary description that is long enough to clear the forty character minimum.
demo-standards
Use when editing demo code in a touchstone fixture repo, a deliberately ordinary description that is long enough to clear the forty character minimum.
demo-standards
Use when editing demo code in a touchstone fixture repo, a deliberately ordinary description that is long enough to clear the forty character minimum.