โ† All Angular Web Framework Flashcard Decks

Angular Industry Standards Flashcards

7 cards from real Angular Web Framework practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Angular Industry Standards flashcards as text
  1. Which Angular style guide convention is recommended for naming a service that handles user data?

    Answer: UserDataService

    The Angular style guide recommends PascalCase for class names, so UserDataService is correct for the class itself.

  2. According to Angular's official style guide, what is the recommended maximum number of lines for a single component file?

    Answer: 400

    The Angular style guide recommends keeping files under 400 lines to maintain readability and single responsibility.

  3. What is the recommended approach for handling HTTP errors in enterprise Angular applications?

    Answer: Use a global HTTP interceptor

    A global HTTP interceptor centralizes error handling, logging, and retry logic across the entire application.

  4. Which testing ratio is recommended by the Angular team for a balanced test suite?

    Answer: 70% unit, 20% integration, 10% e2e

    Angular follows the testing pyramid: mostly unit tests, fewer integration tests, and minimal e2e tests for the best cost-to-coverage ratio.

  5. What is the industry-standard tool used for enforcing Angular coding standards in CI pipelines?

    Answer: TSLint (deprecated) replaced by ESLint with @angular-eslint

    TSLint is deprecated; the Angular community standard is ESLint configured with the @angular-eslint ruleset.

  6. What does the Angular CLI schematic `ng generate` enforce by default to ensure consistency?

    Answer: Consistent file naming and folder structure per Angular style guide

    ng generate schematics follow the Angular style guide naming conventions (kebab-case files, PascalCase classes) by default.

  7. Which practice is considered a standard for managing environment-specific configuration in Angular?

    Answer: Using environment.ts and environment.prod.ts with file replacements

    Angular's environment file replacement mechanism at build time is the standard way to manage environment-specific values.