Bird
0
0

Why does Angular CLI convert component names to kebab-case when generating files and folders?

hard📝 Conceptual Q10 of 15
Angular - Components
Why does Angular CLI convert component names to kebab-case when generating files and folders?
ATo reduce file name length for faster compilation
BBecause kebab-case is required by TypeScript syntax
CTo make component names case-insensitive in Angular templates
DTo follow web standards and improve readability in URLs and file systems
Step-by-Step Solution
Solution:
  1. Step 1: Understand naming conventions

    Kebab-case is a common web standard for file and folder names, improving readability and consistency.
  2. Step 2: Analyze other options

    Kebab-case is not required by TypeScript, does not affect template case sensitivity, and does not impact compilation speed.
  3. Final Answer:

    To follow web standards and improve readability in URLs and file systems -> Option D
  4. Quick Check:

    Kebab-case used for web standard naming [OK]
Quick Trick: Kebab-case improves readability and follows web standards [OK]
Common Mistakes:
  • Thinking kebab-case is TypeScript requirement
  • Assuming it affects Angular template case sensitivity
  • Believing it speeds up compilation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes