Bird
0
0

What is a key advantage of using an external template in an Angular component?

easy📝 Conceptual Q1 of 15
Angular - Components
What is a key advantage of using an external template in an Angular component?
AIt automatically improves the component's runtime performance
BIt allows templates to be written directly inside the component decorator
CIt keeps the component code cleaner by separating HTML from TypeScript
DIt disables Angular's change detection for that component
Step-by-Step Solution
Solution:
  1. Step 1: Understand template placement options

    Angular components can have templates inline or in separate files (external).
  2. Step 2: Identify benefits of external templates

    External templates keep HTML separate from TypeScript, making code cleaner and easier to maintain.
  3. Final Answer:

    It keeps the component code cleaner by separating HTML from TypeScript -> Option C
  4. Quick Check:

    External template advantage = Cleaner code [OK]
Quick Trick: External templates separate HTML for cleaner code [OK]
Common Mistakes:
  • Confusing inline templates as external
  • Thinking external templates improve runtime speed
  • Believing external templates disable change detection

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes