Skip to main content

What is the difference between Content Projection and View Projection?

Senior Angular
Quick Answer Content projection (ng-content): parent passes markup INTO a component - the child controls layout, parent provides content. View projection is not a standard Angular term. ViewChild queries elements within the component's own template. ContentChild queries projected content. Content projection enables reusable container components (cards, panels, dialogs) that accept arbitrary content from parents.

Answer

Content Projection inserts external content into a child component's template, enabling reusable layout patterns.

View Projection uses internal views created by the component via ViewChild, ViewContainerRef, or embedded views.

Content projection passes external markup; view projection manages internal view trees.

S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice