Angular video series - #6 ng-content

Published: 27 May 2021
on channel: Code with Sloba
2,252
94

ng-content uses content projection to take HTML of another Angular component and to display it inside itself.

It is a very powerful tool when you are building Angular components intended for reuse. I see it used extensively in frameworks such as ng material.

When do you want to use ng-content?

Anytime you want to inject any kind of HTML into a component, you can do so with ng-content.

************************************************************
0:00 Intro
0:30 When to use ng-content
0:42 Creating first ng-content
1:40 Multi-slot content projection
2:45 Outro

************************************************************
Previous Video:    • Angular video series - #5 Component s...  
Next video:    • Angular video series - #7 Template st...  
Full series:    • Full Angular Course  
************************************************************
Linkedin: link   / slobodan-gajic  
Portfolio: https://bobangajicsm.github.io/portfo...
Twitter:   / _slobodangajic_  
************************************************************


Watch video Angular video series - #6 ng-content online without registration, duration hours minute second in high quality. This video was added by user Code with Sloba 27 May 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,252 once and liked it 94 people.