Loading...
Loading...
Angular coding standards with version-aware patterns. Automatically detects Angular version from package.json and applies appropriate patterns. Use when writing Angular components, services, or TypeScript code.
npx skill4agent add khaihuynhvn/mcp-server_ai-interaction angular-codingC:\Users\BLogic\.cursor\skills\project-scanner\SKILL.mdGlob: **/*.service.ts → Xem service pattern
Glob: **/*.component.ts → Xem component pattern
Glob: **/*.model.ts → Xem model/interface pattern
Grep: FormGroup → Xem form patternpackage.json@angular/core"@angular/core": "^17.0.0" // → v17
"@angular/core": "~15.2.0" // → v15| Version | Files to Read |
|---|---|
| v13-14 | base.md + module-based.md |
| v15-16 | base.md + standalone.md + signals.md (preview) |
| v17 | base.md + standalone.md + signals.md + control-flow.md |
| v18-19+ | base.md + standalone.md + signals.md + control-flow.md + advanced-v18-19.md |
| Type | Convention | Example |
|---|---|---|
| Signal | Prefix | |
| Observable | Suffix | |
| Private | Prefix | |
| Priority | Principle | Guideline |
|---|---|---|
| 🥇 | Angular-native first | 95% dùng Angular built-in (reactive forms, validators, pipes, directives). 5% custom code khi Angular không hỗ trợ |
| 🥈 | Performance | OnPush, signals, object mapping > array loop, minimal subscriptions |
| 🥉 | Readability | Simple code, dễ đọc, dễ sửa cho dev khác. OOP + SOLID |
Có vấn đề cần giải quyết?
↓
Angular có built-in? (FormControl, Pipe, Directive, Validator...)
├─ YES → Dùng Angular (95%)
└─ NO → Tạo custom với SOLID pattern (5%)