The new DestroyRef Provider in Angular 16 (2023)
12.4 هزار بار بازدید -
پارسال
-
💥 Become a PRO with
💥 Become a PRO with my in-depth Angular Forms Course💥
🔗 10% discount for the first 10 students - https://bit.ly/advanced-ng-forms-disc...
The Angular 16 is out which brings a myriad of new cool features and one of such features is a new injectable entity called DestroyRef that you can inject into any Angular building block like component or service and register a callback that will be executed when this scope is destroyed. Sounds like the ngOnDestroy lifecycle hook, right? Exactly! In this video, we will try to figure out what is the difference between those 2 options and which additional options give us the brand-new DestroyRef token.
🕒 Time Codes:
00:00:00 - Intro;
00:01:11 - Basic use cases and differences with ngOnDestroy hook;
00:07:25 - How it is used in takeUntilDestroyed;
00:11:18 - Outro;
💡 Short Frontend Snacks (Tips) every week here:
Twitter - Twitter: DecodedFrontend
Instagram - Instagram: decodedfrontend
LinkedIn - LinkedIn: dmezhenskyi
🔗 10% discount for the first 10 students - https://bit.ly/advanced-ng-forms-disc...
The Angular 16 is out which brings a myriad of new cool features and one of such features is a new injectable entity called DestroyRef that you can inject into any Angular building block like component or service and register a callback that will be executed when this scope is destroyed. Sounds like the ngOnDestroy lifecycle hook, right? Exactly! In this video, we will try to figure out what is the difference between those 2 options and which additional options give us the brand-new DestroyRef token.
🕒 Time Codes:
00:00:00 - Intro;
00:01:11 - Basic use cases and differences with ngOnDestroy hook;
00:07:25 - How it is used in takeUntilDestroyed;
00:11:18 - Outro;
💡 Short Frontend Snacks (Tips) every week here:
Twitter - Twitter: DecodedFrontend
Instagram - Instagram: decodedfrontend
LinkedIn - LinkedIn: dmezhenskyi
پارسال
در تاریخ 1402/03/03 منتشر شده
است.
12,427
بـار بازدید شده