Angular Content Projection: Everything You Need to Know
Vložit
- čas přidán 27. 07. 2024
- It's very important to know how to effectively create #angular reusable #components. In this video, you will learn how to achieve this using Content Projection.
Chapters:
0:00 Intro
2:40 Provide an Input in the component
3:29 Intro to Content Projection using a single slot
4:53 Use multiple slots
8:50 Use multiple slots by leveraging the angular directives
12:03 Learn how to use conditional slots
19:50 Thank you
✨ Code: github.com/profanis/codeShots...
******************************************************
Let's connect
******************************************************
Twitter: / prodromouf
LinkedIn: / prodromouf
#angular #learnAngular #angularTutorial #webdeveloper #webdevelopment #frontenddeveloper #components - Věda a technologie
Love it. One comment:
at 17:35, we can use `ContentChild(CarMainContent, {read: TemplateRef}) carMainContent: TemplateRef` to read the TemplateRef token from the directive instead of having to declare/inject the TemplateRef in the Directive itself.
Ohh yes! Thanks for pointing this out Chau 🙂
You are awesome, Profanis! 🥳! Please keep posting the videos. I'm checking your channel daily.
Thank you! Glad you like my content :)
Have been looking for this solution for a complete week, very helpful!!!!
Glad it helped!
Excellent, you are really a great teacher. Thank you and good health.
Thanks for your warm feedback. Glad you liked it :)
Awesome video - nice pace and a lot packed into such a great example and use case.
Glad you liked it Ady! :)
Thank you for the always helpful content! Have a great year!
Thanks a lot. Have a wonderful year 🎉
Thank you!! I´ve been learning a lot from your videos; very clear, explanatory and useful.
Glad you like them! :)
thanks for the video. Angular content projection is a very complicated stuff. I wish Angular could simplify it like react does. In React just put everything inside tags and receive everything with children property in component.
thanks for your contribution
Thank you for this! It helped me a lot!
Woohooo!!! New video!
Thank you man!
Hope you enjoyed it!
Brilliant video, I'm glad I clicked on this one first while searching for a vid. But what the hell, even such a small thing in the become sort of a mosnter. And at my work I have a HUGE component built with container ng content and containers. And it is a freaking mess to look at and maintain. I feel like McConaughey who fell into the black hole
Super clear explanation. Thanks!
Glad you liked it 😊
Wow.... so many concepts in one video. I loved it. Amazing... Subscribed and liked. 😀
Awesome! Thank you!
thank you
Clearly explained!
Thanks! Glad you liked it!
magnific content the this video.
Thanks for your feedback. Glad you liked it!
Cool explanation, liked it.
That "obj" hint on 3min 06sec, left screen line 4: @Component(obj: { .... - what plugin do you use for that?
(there are more examples, but I hope my questions makes sense)
Thank you.
It's this setting in the settings.json file
"typescript.inlayHints.parameterNames.enabled": "all"
Thanks bro
You are welcome :)
...Angular really seems to have the worst templating syntax for composition.
Thank you!! this is very awesome
Glad you liked it! :)