You're building a tab component system where each tab can have custom content. Which Angular feature would be most appropriate to allow users to define content for each tab?

  • Content Projection (ng-content)
  • Dependency Injection (DI)
  • Input Properties (Bindings)
  • Output Properties (Events)
In Angular, Content Projection (ng-content) is the most appropriate feature to allow users to define custom content for each tab. It allows users to pass in content that will be inserted into designated placeholders within your component. Input properties allow data binding, output properties handle events, and Dependency Injection is used for providing services, making Content Projection the correct choice for this scenario.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *