โ† All Angular Web Framework Flashcard Decks

Performance Optimization & Build Tools Flashcards

6 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 6 Performance Optimization & Build Tools flashcards as text
  1. Which Angular feature delays loading a module until a user navigates to its associated route?

    Answer: Lazy loading

    Lazy loading uses the loadChildren property in routing config to split a module into a separate chunk downloaded on demand.

  2. What is the purpose of the Angular CLI command `ng build --configuration production`?

    Answer: Compiles the app with optimizations like minification and tree-shaking

    The production build enables AOT compilation, minification, dead code elimination, and differential loading for optimized output.

  3. Which Angular directive efficiently re-renders only changed items in a list by tracking identity?

    Answer: *ngFor with trackBy

    *ngFor with a trackBy function lets Angular identify which list items changed, avoiding full DOM re-creation on each update.

  4. What does Ahead-of-Time (AOT) compilation do in Angular?

    Answer: Compiles templates and TypeScript during the build step

    AOT compiles Angular HTML templates and TypeScript code into JavaScript during the build, producing faster startup and smaller bundles.

  5. Which Angular SSR strategy pre-renders pages at build time for immediate static HTML delivery?

    Answer: Static site generation (prerendering)

    Angular's prerender feature (ng-universal or Angular 17+ built-in) generates static HTML files at build time for instant first-paint.

  6. What Angular pipe should you use to avoid repeated heavy computations in templates?

    Answer: Pure custom pipe

    A pure pipe is only re-executed when its input reference changes, caching the result and skipping recomputation on every change detection cycle.