Bird
0
0

Which Angular element is used to mark where projected content will appear inside a component's template?

easy📝 Conceptual Q2 of 15
Angular - Component Interaction
Which Angular element is used to mark where projected content will appear inside a component's template?
A<code><ng-project></code>
B<code><ng-template></code>
C<code><ng-container></code>
D<code><ng-content></code>
Step-by-Step Solution
Solution:
  1. Step 1: Identify content projection tag

    Angular uses <ng-content> to specify where projected content is inserted.
  2. Step 2: Differentiate from other Angular tags

    <ng-template> is for template blocks, <ng-container> is a grouping element, and <ng-project> does not exist.
  3. Final Answer:

    <ng-content> -> Option D
  4. Quick Check:

    Content projection tag = <ng-content> [OK]
Quick Trick: Use to project external content inside components [OK]
Common Mistakes:
  • Confusing with
  • Using non-existent tags like
  • Thinking projects content

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes