Angular & Signals (283 Qs)•Part 10: Reactive Forms, Standalone Components, Signals & NgRx (256 - 283)
What is content projection?
Content projection is a pattern in which you insert, or project, the content you want to use inside another component.
Practical Code Example
html
<!-- Content Projection with <ng-content>: -->
<div class="card-container">
<div class="card-header">
<ng-content select="[card-header]"></ng-content>
</div>
<div class="card-body">
<ng-content></ng-content>
</div>
</div>