NgComponentOutlet in Angular - DECLARATIVE Dynamic Components

Опубликовано: 28 Август 2024
на канале: Decoded Frontend
8,060
426

To try everything Brilliant has to offer—free—for a full 30 days, visit https://brilliant.org/DecodedFrontend.
You’ll also get 20% off an annual premium subscription.

Let’s talk again about dynamic components in Angular and the role of the ngComponentOutlet directive in this process. In short, this directive offers an alternative (declarative) way to create components in Angular compared to the one I covered in the previous video.

Today, you will see how to utilize this directive to create or destroy components with inputs and content projection. We will also examine its limitations and investigate its source code. Finally, you will see some real-life use cases for this directive, like creating components from JSON config.

🌱🤝 Support Decoded Frontend:
Angular Courses - https://bit.ly/discounted-course-bundle
Patreon -   / decodedfrontend  

🕒 Time Codes:
00:00 - Intro;
00:01:23 - NgComponentOutlet Basics;
00:06:22 - Source Code Investigation ;
00:08:02 - Content Projection & NgComponentOutlet;
00:11:54 - Limitations;
00:15:11 - Sponsorship Integration;
00:16:30 - Real-life use case;
00:16:00 - Where to learn more? ;
00:19:37 - Outro;

Code on GitHub:
https://github.com/DMezhenskyi/angula...

GitHub Pull Request | NgComponentOutlet Outputs Support by @Jean__Meche
https://github.com/angular/angular/pu...

💡 For more Angular tips, follow also:
Discord - https://bit.ly/decoded-frontend-discord
Twitter -   / decodedfrontend  
Instagram -   / decodedfrontend  
LinkedIn -   / dmezhenskyi  

This video was sponsored by Brilliant.


Смотрите видео NgComponentOutlet in Angular - DECLARATIVE Dynamic Components онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Decoded Frontend 28 Август 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 8,06 раз и оно понравилось 42 людям.