返回 Skill 列表
extension
分类: 开发与工程无需 API Key

Forms

类型化响应式表单和验证器的标准

person作者: jakexiaohubgithub

Forms

Priority: P2 (MEDIUM)

Principles

  • Reactive Forms: Always use Reactive Forms (FormControl, FormGroup) over Template-Driven Forms for complex inputs.
  • Strict Typing: Use strictly typed forms FormGroup<LoginForm>.
  • Non-Nullable: Use nonNullable: true option to avoid null checks on form values.

Guidelines

  • Component Store integration: Sync form value changes to Signal Store/Service if needed.
  • Split Logic: Logic for validation should be in custom validator functions, not inside the component.

References