frontend-angular-form
π―Skillfrom duc01226/easyplatform
Generates Angular reactive forms with advanced validation, async validators, dependent validation, and FormArrays using platform-specific design patterns.
Installation
npx skills add https://github.com/duc01226/easyplatform --skill frontend-angular-formSkill Details
Use when creating reactive forms with validation, async validators, dependent validation, and FormArrays using platform patterns.
Overview
# Angular Form Development Workflow
Use when creating/modifying reactive forms with validation, async validators, dependent validation, or FormArrays.
Decision Tree
```
What type of form?
βββ Basic form (no auth) β PlatformFormComponent
βββ Form with auth context β AppBaseFormComponent (typical choice)
βββ With async validation β AppBaseFormComponent + ifAsyncValidator
βββ Cross-field validation β AppBaseFormComponent + dependentValidations
βββ Dynamic fields β AppBaseFormComponent + FormArray config
```
Workflow
- Search existing forms:
grep "{Feature}FormComponent" --include="*.ts" - Read design system docs (see Read Directives below)
- Define ViewModel interface for form data
- Implement
initialFormConfig()with controls, validators, dependentValidations - Implement
initOrReloadVm()for create/edit mode data loading - Add
onSubmit()withvalidateForm()guard - Template with BEM classes on all form elements
- Verify checklist below
Key Rules
- Always call
validateForm()before submit - Use
ifAsyncValidator(condition, validator)- never run async validators unconditionally - Configure
dependentValidationsfor cross-field re-validation - FormArrays use
{ modelItems, itemControl }config pattern - Use
formControls('name')to access control in template - Loading state:
isLoading$('save')()in template
File Location
```
src/Frontend/apps/{app-name}/src/app/features/{feature}/
βββ {feature}-form.component.ts|html|scss
```
β οΈ MUST READ Before Implementation
IMPORTANT: You MUST read these files before writing any code. Do NOT skip.
- β οΈ MUST READ
.claude/skills/shared/angular-design-system.mdβ hierarchy, SCSS, platform APIs - β οΈ MUST READ
.claude/skills/shared/bem-component-examples.mdβ BEM form examples - β οΈ MUST READ
.claude/skills/frontend-angular-form/references/form-patterns.mdβ basic, async, dependent, FormArray patterns - β οΈ MUST READ target app design system:
docs/design-system/03-form-patterns.md
Anti-Patterns
- Missing
validateForm()before submit - Async validator without
ifAsyncValidatorconditional wrapper - Missing
[formGroupName]="i"in FormArray template loops - Form elements without BEM classes
- Missing error messages for validation rules
Verification Checklist
- [ ]
initialFormConfigreturns form configuration - [ ]
initOrReloadVmhandles create + edit modes - [ ]
validateForm()called before submit - [ ] Async validators wrapped with
ifAsyncValidator - [ ]
dependentValidationsconfigured for cross-field rules - [ ] FormArrays use
modelItems+itemControl - [ ] Error messages for all validation rules
- [ ] All form elements have BEM classes
IMPORTANT Task Planning Notes
- Always plan and break many small todo tasks
- Always add a final review todo task to review the works done at the end to find any fix or enhancement needed
More from this repository10
Generates comprehensive test plans, test cases, and coverage analysis to support QA engineers in systematic software testing and quality assurance.
Teaches Claude new patterns, preferences, and conventions to remember across coding sessions using explicit learning commands.
Helps Product Owners prioritize ideas, manage backlogs, and communicate product vision through structured decision-making frameworks.
pdf-to-markdown skill from duc01226/easyplatform
Generates comprehensive enterprise module documentation with a 26-section structure, creating detailed specs and folder hierarchy for business features.
readme-improvement skill from duc01226/easyplatform
Manages Claude's learned patterns by listing, viewing, archiving, and dynamically adjusting pattern confidence levels.
Optimizes system performance by triaging and routing to specific strategies for database, frontend, API, jobs, and cross-service bottlenecks.
Analyzes implementation plans by extracting features, assessing change impacts, mapping specifications, and preparing comprehensive technical and business impact reports.
Rapidly build accessible React UI with shadcn/ui components, Radix primitives, and Tailwind CSS utility styling for modern web applications.