โ† 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 HTTP client operator in Angular prevents duplicate concurrent requests for the same resource?

    Answer: shareReplay(1)

    shareReplay(1) multicasts the HTTP Observable and replays the last emission to late subscribers, preventing duplicate network requests.

  2. What Angular Universal package enables server-side rendering to improve initial load performance and SEO?

    Answer: @angular/universal / @angular/ssr

    @angular/ssr (formerly Angular Universal) renders the Angular app on the server, returning complete HTML to the browser for faster First Contentful Paint.

  3. What is the purpose of the `preconnect` link hint added to index.html for Angular apps using Google Fonts?

    Answer: Establishes early TCP/TLS connections to the font server, reducing latency

    rel="preconnect" tells the browser to open a connection to the font origin early, cutting the round-trip cost when the font request actually fires.

  4. Which Angular PWA feature caches assets and API responses for offline use?

    Answer: Service Worker via @angular/pwa

    @angular/pwa adds a pre-configured Service Worker that caches the app shell and API responses according to the ngsw-config.json policy.

  5. What does enabling `ivy` (the default since Angular 9) improve compared to the legacy View Engine?

    Answer: Smaller bundles, faster compilation, and better tree-shaking through locality principle

    Ivy compiles each component independently (locality), enabling better tree-shaking, smaller bundles, and faster incremental rebuilds.

  6. What Angular CLI flag enables differential loading to serve modern ES2015+ bundles to modern browsers and ES5 to legacy ones?

    Answer: --es5BrowserSupport (deprecated, now automatic via browserslist)

    Angular CLI uses the browserslist file to automatically determine whether to emit ES5 legacy bundles alongside modern bundles; explicit flags are deprecated.