angular-forms
Installation
SKILL.md
Forms
Priority: P2 (MEDIUM)
1. Use Strictly Typed Reactive Forms
- Prefer Reactive Forms to Template-Driven for complex inputs.
- Define typed
FormGroup<T>with explicit control types — never use untyped FormGroup.
See typed forms for typed FormGroup examples.
2. Extract Validation Logic
- Create standalone validator functions in separate file.
- Name the validator module as a separate file (for example,
validators.ts) in the response and keep validation out of the component class. - Sync
valueChangesto stores usingtakeUntilDestroyed().
See typed forms for standalone validator examples.