CodeZettaInterview Hub

Angular · Components · Fresh / Intern · Concept

What is content projection and when do you use ng-content?

Short Interview Answer

Content projection slots parent-provided markup into a child template via ng-content.

Detailed Explanation

Use select to project into multiple slots. Prefer projection for reusable shells (cards, layouts) instead of hardcoding children. Distinguish projected content from the component's own view for styling and queries.

Did you know this answer?