~/talk

Handling Angular Forms Without Losing Your Sanity

Talkat NG-DE Conference 2019 · 2019-08-30..08-31· [angular, frontend-architecture]
slides:none on file

Compares template‑driven vs reactive forms and shows concrete fixes: use FormControl/FormGroup/FormArray and FormBuilder; subscribe to valueChanges to make a subcategory dynamically required, call setValidators and updateValueAndValidity, and validate “at least two” items with a custom validator. Demonstrates formArray.insert/remove for dynamic ingredients, and builds a star‑rating/typeahead component wired to the form via ControlValueAccessor: writeValue / registerOnChange / registerOnTouched (optional setDisabledState) so the component submits an ID while displaying readable text.

AI-written summary · about

  1. 0:00Intro
  2. 1:06Who is Laura Wang
  3. 1:52Reactive Forms
  4. 9:18Dynamic Required Fields
  5. 14:32Pattern Validation
  6. 16:22Dynamic Form Controls
  7. 17:02Form Array
  8. 17:22Form Array Methods
  9. 17:57Form Array Example
  10. 18:41Remove Form Control
  11. 19:48Example
  12. 21:00ControlValueAccess
  13. 21:42Create New Component
  14. 22:05Star Markup
  15. 22:32Implementing Methods
  16. 23:27Set Disabled State
  17. 23:52Set Rating
  18. 24:38Recap
  19. 27:12Questions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.