Comparing Angular Forms
summary
Compares Angular’s template-driven forms with reactive forms and claims reactive is more scalable, testable and predictable. Shows concrete APIs: FormControl/FormGroup/FormArray and FormBuilder to avoid repeated new calls, demonstrates Validators plus a custom pure-function validator that forbids the name "Bob", and uses the formControl.valueChanges observable for live reactions. Describes template change detection via ng-touched ng-dirty ng-valid CSS classes, explains template forms require rendering for tests while reactive forms are synchronous and manipulable entirely in code.
AI-written summary · about
chapters (17)
- 0:00Intro
- 0:52Angular Documentation
- 1:38Template Forms
- 2:08Basic Forms
- 2:20Component Class
- 2:44HTML Template
- 3:18Example
- 4:25Change Detection
- 6:34Error Handling
- 7:47Reactive Forms
- 8:20Reactive Forms API
- 8:56Reactive Forms in Angular
- 10:36Form Builder
- 11:39Validators
- 12:43Custom Validation
- 13:45Control Value Changes
- 15:26Reactive vs Template Forms
related talks
48mHandling Angular Forms Without Losing Your Sanity
28mHandling Angular Forms Without Losing Your Sanity
43mAngular Reactive Forms - Developing Forms and Validation with Angular
26mReactive Forms Overview
47mReactive forms in Angular
35mLet's Build a Form Around It
20mLet’s Build A Form Around It
36mUnleash the Power of Angular Reactive Form
