Stronger Type-Checking in Templates with Ivy
summary
Angular Ivy adds strictTemplates which infers types inside templates (ngFor loop variables, $event types), enforces input assignability (catches async pipe nulls) and fixes safe‑navigation bugs; migration uses incremental flags like strictInputTypes and strictNullInputTypes so large apps can toggle checks off while fixing code; implementation generates TypeScript type‑check blocks, feeds them to tsc and maps errors back to original template locations.
AI-written summary · about
chapters (17)
- 0:00Intro
- 1:31What is strict Templates?
- 3:19Color scheme
- 4:19Type Checking in v8
- 5:46Checked in basic mode
- 5:58fullTemplateTypeCheck Mode
- 6:31Examples
- 8:29strict Templates: ngFor
- 10:48Safe navigation setup
- 12:15strict Templates: Safe navigation
- 13:08Enabling strict Templates
- 13:56Why disable specific checks?
- 15:34strictSafeNavigation Types: false
- 15:51strictDomEventTypes: false
- 17:13Example Template
- 17:55Generated Type-checking Code
- 20:29Summary








