Structural Directives in Angular – How to Make It Strict (In-Depth)

Published: 01 February 2022
on channel: Decoded Frontend
9,015
449

#angular #structuraldirectives #webdevelopment #tutorial
Structural Directives are one of the most powerful features in Angular and this is the 3rd episode of the video series about "Custom Structural Directives. From this tutorial you will learn how to make types in your directives more strict, so you will leave less space for potential errors which otherwise might be caught too late when the user already interacts with your App in production. I hope you will learn a lot of new tricks today. Let me know if you like the video!

💥 Angular courses made by Dmytro - https://bit.ly/df-courses 💥
✂️ Use coupon YOUTUBE_DISCOUNT to get a 10%-off discount ✂️

🕒 Time Codes:
00:00:00 - Intro;
00:01:22 - Define strict type for Directive (Template) context;
00:03:15 - Implement Context Type Guard;
00:05:10 - Explenation of what is Type Predicate in TypeScript;
00:07:16 - Continue with Context Type Guard;
00:08:17 - Introducing Directive Input Type Narrowing;
00:10:05 - Implementing Directive for the demo use-case;
00:14:12 - Explanation of Input Type Narrowing;
00:17:11 - Outro;

🔗 Link to GitHub repo:
https://github.com/DMezhenskyi/struct...

🔗 Link to TypeScript's Type Predicate
https://www.typescriptlang.org/docs/h...

🔗 Angular Docs about type narrowing in Structural Directives
https://angular.io/guide/structural-d...


Watch video Structural Directives in Angular – How to Make It Strict (In-Depth) online without registration, duration hours minute second in high quality. This video was added by user Decoded Frontend 01 February 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 9,015 once and liked it 449 people.