InterviewHubPRO
Section Overview
Q124

Question 124 of 283

Part 6: Decorators, Dependency Injection & Tooling (124 - 150)

44%
Angular & Signals (283 Qs)•Part 6: Decorators, Dependency Injection & Tooling (124 - 150)

What are the case types in Angular?

Angular uses capitalization conventions to distinguish the names of various types. Angular follows the list of the below case types.

  1. camelCase : Symbols, properties, methods, pipe names, non-component directive selectors, constants uses lowercase on the first letter of the item. For example, "selectedUser"
  2. UpperCamelCase (or PascalCase): Class names, including classes that define components, interfaces, NgModules, directives, and pipes uses uppercase on the first letter of the item.
  3. dash-case (or "kebab-case"): The descriptive part of file names, component selectors uses dashes between the words. For example, "app-user-list".
  4. UPPER_UNDERSCORE_CASE: All constants uses capital letters connected with underscores. For example, "NUMBER_OF_USERS".

Practical Code Example

text
// Naming Conventions:
// - camelCase: properties, methods, inputs (myProperty, onClick)
// - kebab-case: HTML selectors, filenames (app-user-profile, user.component.ts)
// - PascalCase: classes, interfaces, types (UserProfileComponent, UserState)