Angular Web Framework Cheat Sheet 2026

The 30 highest-yield Angular Web Framework facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.

50 questions
60 min time limit
70% to pass
  1. In a web browser, how would you display dates? Use the Angular pipe class in the template
  2. Which Angular strategy checks only the current component and its ancestors when an input reference changes? OnPush
  3. When should you use `spyOn(service, 'method').and.returnValue(of(data))` in an Angular test? When mocking an Observable-returning service method to control test data
  4. What is the correct way to provide a custom async validator as a class implementing `AsyncValidator`? Implement the `validate()` method returning Observable or Promise
  5. Which Angular signal API creates a writable reactive value introduced in Angular 16+? signal()
  6. Which applications must be installed before you can download Angular? Node.js
  7. Which method on a Jasmine spy allows you to define what value it returns when called? spy.and.returnValue()
  8. In an Angular monorepo, what tool has become the industry standard for managing multiple projects? Nx (formerly Nrwl)
  9. What does `@ContentChildren(ItemComponent)` return inside a component? A QueryList of all projected ItemComponent instances
  10. What does the `async` pipe do when used in a template with an Observable? Subscribes and automatically unsubscribes, rendering the latest value
  11. Which lifecycle hook should you use to perform cleanup such as unsubscribing from Observables to prevent memory leaks? ngOnDestroy
  12. Which Angular build option is recommended for production deployments to minimize bundle size? ng build --configuration=production (enables AOT, tree-shaking, minification)
  13. Which Angular feature delays loading a module until a user navigates to its associated route? Lazy loading
  14. In Angular's template, what does the safe navigation operator (`?.`) prevent? Null or undefined property access that would throw an error
  15. What is the role of `pipe()` in RxJS? Chains multiple operators together into a single transformation
  16. What does Angular's `APP_INITIALIZER` token enable? Running async setup tasks before the app fully bootstraps
  17. Which Angular template syntax creates a local template reference variable for a DOM element? #refName
  18. What is the purpose of the computed() function in Angular Signals? Derive a read-only value from one or more signals
  19. Which Protractor (or Cypress) concept is equivalent to Angular's `waitForAngular` that ensures the app is stable before assertions? Angular zone stability check
  20. In an Angular monorepo with Nx, what is a `buildable` library's main benefit over a regular Nx library? It generates its own compilable output, enabling incremental builds and build caching
  21. According to Angular industry standards, when should you use OnPush change detection strategy? For performance-sensitive components with immutable inputs or observable-driven data
  22. What methods would you use to test your NativeScript Angular app? Run it in a web-browser
  23. What is the purpose of the Validators class? Provides built-in validation functions like required, minLength, maxLength, and pattern
  24. What is the recommended Angular approach for preventing broken links during single-page app navigation? Use PathLocationStrategy with server-side fallback returning index.html for unknown routes
  25. When using `async/await` in an Angular test instead of `fakeAsync`, what function must wrap the test callback? async() from @angular/core/testing
  26. What is the recommended Content Security Policy (CSP) practice for Angular applications to prevent XSS? Use Angular's built-in sanitization and set strict CSP headers server-side
  27. Which practice is considered a standard for managing environment-specific configuration in Angular? Using environment.ts and environment.prod.ts with file replacements
  28. Which observable on a FormControl emits only when the control's validation status changes? statusChanges
  29. What does 'providedIn: root' mean in an @Injectable() decorator? The service is available application-wide as a singleton through the root injector
  30. Which Angular CLI command generates a new library inside an existing workspace? ng generate library my-lib
Was this helpful?