> angular-style-guide

Naming conventions, file structure, and coding standards for Angular projects. Use when naming Angular files, organizing project structure, or following Angular style guide. (triggers: **/*.ts, angular style, naming convention, file structure)

fetch
$curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/angular-style-guide?format=md"
SKILL.mdangular-style-guide

Angular Style Guide

Priority: P0 (CRITICAL)

Principles

  • Single Responsibility: One component/service per file. Small functions (< 75 lines).
  • Size Limits: Keep files under 400 lines. Refactor if larger.
  • Strict Naming: feature.type.ts (e.g., hero-list.component.ts).
  • Barrels: Use index.ts only for public APIs of specific features/libraries. Avoid deep barrel imports within the same feature.
  • LIFT: Locate, Identify, Flat structure, Try DRY.

Naming Standards

  • Files: kebab-case.type.ts
  • Classes: PascalCase + Type suffix (HeroListComponent)
  • Directives: camelCase selector (appHighlight)
  • Pipes: camelCase name (truncate)
  • Services: PascalCase + Service suffix (HeroService)

Anti-Patterns

  • Logic in Templates: Move complex logic to the component class or a computed signal.
  • Deep Nesting: Avoid $>3$ levels of folder nesting.
  • Prefixing interfaces: No IUser. Use User.

References

┌ stats

installs/wk0
░░░░░░░░░░
github stars341
██████████
first seenMar 17, 2026
└────────────

┌ repo

HoangNguyen0403/agent-skills-standard
by HoangNguyen0403
└────────────

┌ tags

└────────────