InterviewHubPRO
Section Overview
Q275

Question 275 of 283

Part 10: Reactive Forms, Standalone Components, Signals & NgRx (256 - 283)

97%
Angular & Signals (283 Qs)•Part 10: Reactive Forms, Standalone Components, Signals & NgRx (256 - 283)

What is ng-content and its purpose?

The ng-content is used to insert the content dynamically inside the component that helps to increase component reusability.

Practical Code Example

html
<!-- Consuming Projected Content: -->
<app-card>
  <h3 card-header>Special Announcement</h3>
  <p>This paragraph is projected into the default body slot!</p>
</app-card>