Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore stronger type-checking in Angular templates with Ivy in this 22-minute conference talk by Alex Rickabaugh at ng-conf: Hardwired. Dive into the new strictTemplates compiler flag, which enables enhanced validation and type-checking for component templates. Understand how the new type-checking system operates, learn strategies for migrating large projects to stricter type-checking, and gain insights into the inner workings of this feature. Discover practical examples, including strictTemplates with ngFor and safe navigation, and learn how to enable strict Templates in your projects. Examine the generated type-checking code and understand why you might need to disable specific checks. By the end of this talk, gain a comprehensive understanding of how to leverage stronger type-checking to improve your Angular applications.
Syllabus
Intro
What is strict Templates?
Color scheme
Type Checking in v8
Checked in basic mode
fullTemplateTypeCheck Mode
Examples
strict Templates: ngFor
Safe navigation setup
strict Templates: Safe navigation
Enabling strict Templates
Why disable specific checks?
strictSafeNavigation Types: false
strictDomEventTypes: false
Example Template
Generated Type-checking Code
Summary
Taught by
ng-conf