Browse all practice questions for the Angular Fundamentals Practice Test. Search by topic, open any question and review its full explanation, then test yourself in the practice quiz.

Angular Fundamentals Practice Test course image
More practice questions

These questions are part of the practice quiz. Start practicing

  • What does zoneless Angular mean in practice?
  • How do you measure frontend success in production?
  • Which approach is commonly used to manage complex global state in Angular?
  • What Angular feature enables a custom UI component to participate in forms without losing its own logic?
  • How do you test custom pipes and directives?
  • For mentoring juniors, which practices are recommended?
  • What are Angular component harnesses?
  • How can you access a template reference variable named #ref in a component?
  • What describes the facade pattern in Angular?
  • What is the difference between switchMap, mergeMap, and concatMap?
  • What syntax is used to declare a template reference variable in an Angular template?
  • What is the primary difference between shallow and deep component testing?
  • Which statement best describes the difference between the constructor and ngOnInit in an Angular component?
  • What is recommended for internationalizing Angular applications?
  • How do you handle large dynamic forms efficiently?
  • How do you prioritize refactors versus feature delivery?
  • Describe a challenging Angular performance bug you fixed. What should you include in your description?
  • What is a major benefit of Ahead-of-Time (AOT) compilation in Angular?
  • How do you protect child routes?
  • Which practices help prevent memory leaks from subscriptions in Angular?
  • How do you handle global API error handling?
  • How would you read route parameters inside a component?
  • What is the difference between providing a service in the root versus in a feature module?
  • For a safe upgrade path to Angular 17+, which approach is recommended?
  • What is backpressure and how do you handle fast streams?
  • How do you handle errors in observable streams?
  • What is the primary purpose of TestBed in Angular unit testing?
  • Which statement best captures when to use NgRx, Signals, and services?
  • When a route uses a resolver, what happens during navigation?
  • What is the purpose of using a preloading strategy such as PreloadAllModules in RouterModule?
  • What technique splits the application into smaller chunks that can be loaded on demand?
  • How do you conduct Angular code reviews?
  • What is a pipe in Angular and how do you implement a custom pipe?
  • Which testing technique uses marble diagrams to model time-based emissions?
  • Which statement best distinguishes template-driven forms from reactive forms?
  • Which pattern most improves performance for dynamic lists rendering in Angular?
  • How do you implement request caching?
  • What practices help prevent unnecessary API calls in Angular apps?
  • How do you cancel HTTP requests in Angular?
  • Which statement correctly distinguishes BehaviorSubject?
  • Which Angular pattern helps prevent memory leaks by handling subscriptions automatically in templates?
  • Which operators help implement retry logic after an error?
  • How do route guards work and what is canActivate used for?
  • How do you handle 404 and fallback routes?
  • In Angular, what does ng-content do, and how are named slots implemented?
  • How does Angular handle CSRF/XSRF protection?
  • In NgModule metadata, which property is used to expose components, directives, or pipes for use in other modules?
  • What is multicasting in RxJS?
  • Which module should be imported in unit tests to isolate HTTP interactions from the real backend?
  • Which mechanism does Angular use to prevent XSS attacks in templates?
  • What techniques are recommended for optimizing large lists and tables in Angular?
  • Standalone components enable easier lazy loading.
  • When do async validators typically run in the validation pipeline?
  • What is environment.ts and how is it used in builds?
  • How do you test standalone components?
  • What are the roles of declarations, imports, providers, and exports in NgModule?
  • What is DomSanitizer and when should it be avoided?
  • Which methods enable implementing micro-frontends with Angular?
  • How are multiple build configurations defined for an Angular project?
  • Which statement describes the differences among Subject, BehaviorSubject, and ReplaySubject in RxJS?
  • How would you create a reactive form with a required name field using FormGroup and FormControl?
  • How do you handle deep linking?
  • Which utility is used to mock HTTP requests in Angular unit tests?
  • In content projection, how do you target a specific piece of projected content to a slot?
  • In route guard tests, what outcome would you typically assert?
  • Beyond route params and query params, which can be used to share data between routes?
  • In NgModule metadata, which property makes a component available to modules that import the module?
  • What is the purpose of the HttpClientModule and where should it be imported?
  • Which actions are involved in implementing SSR with Angular Universal?
  • Distinguish pure vs impure pipes and their use cases.
  • How do you build reusable form components?
  • What practices define a scalable Angular monorepo architecture?
  • Which operator runs inner subscriptions sequentially, one after another?
  • Which guard prevents a lazy-loaded module from loading?
  • Which concept enables decoupled, reusable UI units that can be used across apps without relying on NgModule declarations?
  • How does parameter inheritance work in nested routes?
  • Module federation in Angular is primarily used for?
  • In planning architecture decisions, which artifacts support collaboration?
  • Which guard determines whether a user can navigate to a route?
  • Which guard prevents a module from being loaded until conditions are met?
  • Which pattern helps prevent memory leaks by automatically unsubscribing from observables in templates?
  • How do you lazy load components and routes in Angular?
  • Under what circumstance would you choose to use an InjectionToken?
  • Which return types are valid for a CanDeactivate guard in Angular?
  • How do you preload lazy-loaded modules?
  • What pattern allows sharing data between unrelated components in Angular?
  • What are Signals in Angular and when should you use them?
  • What is view encapsulation and the differences between Emulated, None, and ShadowDom?
  • Which statement describes how to access a DOM element in a component class using a template reference variable?
  • How do you write end-to-end tests in Angular?
  • Why is ngOnInit preferred over the constructor for initialization logic that relies on inputs?
  • How do you pass data between routes?
  • Where do you specify an asynchronous validator for a reactive form control?
  • Which tools are recommended to profile Angular performance issues?
  • How do you upload a file using HttpClient?
  • How do you dynamically add/remove form controls?
  • How is internationalization (i18n) supported in Angular?
  • What is the recommended approach to verify standalone component behavior in tests?
  • What does ChangeDetectionStrategy.OnPush do in Angular?
  • Which combination reduces the initial bundle size in Angular?
  • How do you implement retry logic for failed requests?
  • Why would you use a host component when testing a pipe or directive?
  • Runtime toggles with guards are used to achieve what in feature flag management?
  • Which strategies support offline functionality in Angular?
  • What is HttpClient and how do you perform a basic GET request?
  • What happens when a notifier emits in takeUntil?
  • What is canDeactivate and how is it implemented to guard against leaving a form with unsaved changes?
  • How do you handle HTTP errors globally in Angular?
  • Where should you add a validator to implement cross-field validation?
  • How does Angular lazy loading work internally?
  • Which RxJS operator is commonly used to cancel in-flight HTTP requests when a component is destroyed?
  • How should you test route guards in Angular?
  • How does the providers array differ between NgModule and component providers?
  • What is lazy loading in Angular and how do you configure a feature module to lazy load?
  • How do async validators work?
  • Which statement accurately describes canActivate in Angular routing?
  • How do you ensure frontend security best practices?
  • How do you mentor junior Angular developers?
  • In Angular, what is a primary purpose of an HTTP interceptor?
  • What is a route resolver used for?
  • Which approach primarily improves initial load time by loading parts of the application only when they are needed?
  • What does memoization refer to in the context of Angular performance optimization?
  • How does Angular hydration work with server-side rendering?
  • How do you implement cross-field validation in a reactive form?
  • How do you implement conditional validation rules?
  • Which factors contribute to unnecessary change detection cycles?
  • What is a Route in Angular and how do you configure a basic route?
  • In a scalable Angular workflow, what is the purpose of CI caching?
  • Can Angular operate without Zone.js, and if so, how?
  • What are structural directives and provide examples?
  • Is runtime translation of i18n messages mandatory in Angular?
  • Theming tokens in an Angular design system are used to?
  • In designing reusable UI component libraries, which practices are recommended?
  • Which statement correctly distinguishes ViewChild from ContentChild?
  • Which decorators are used to access child components or content?
  • Which Angular testing utility helps verify and flush mock HTTP requests in unit tests?
  • What is ControlValueAccessor and when do you use it?
  • What is Ahead-of-Time (AOT) compilation and its benefits?
  • How do you reset and partially update a form?
  • What does shareReplay do and when should you use it?
  • In Angular routing, what does the loadChildren property do?
  • Which lifecycle hook is called after the component's content has been projected and initialized?
  • Which of the following best describes how to mock HttpClient in Angular unit tests?
  • Which Angular feature allows declaring and using a component without adding it to an NgModule?
  • Which lifecycle hook is primarily used for initialization after data-bound properties are set?
  • Which lifecycle hook is executed after the component's view has been fully initialized?
  • How does two-way data binding work in Angular, and which directive enables it?
  • During code reviews, which areas should be evaluated?
  • Which statement best describes @Input and @Output in Angular?
  • What is a route resolver and when would you use it?
  • How do you handle cross-team frontend dependencies?
  • What is differential loading?
  • What does fakeAsync and tick() accomplish in tests?
  • How do you navigate programmatically within a component?
  • Where do providers resolve in Angular's dependency injection hierarchy?
  • What is an InjectionToken and why would you need it?
  • Which approach is best for logging HTTP traffic across an Angular app?
  • What techniques help prevent UI flicker during navigation?
  • Which approach best aids debugging production-only Angular issues?
  • How do you test observables?
  • Which sequence correctly represents the typical order of Angular component lifecycle hooks from initialization through destruction?
  • What is route reuse strategy?
  • Which statement about trackBy in ngFor best describes its benefit?
  • Which Angular testing utility is used to configure and initialize a testing module?
  • What is the purpose of trackBy in ngFor?
  • What is the role of Zone.js in Angular applications?
  • What is a key difference between reactive forms and template-driven forms?
  • When presenting a performance optimization, which elements are essential?
  • Content projection in Angular is implemented using which feature?
  • What is the purpose of the bootstrap property in NgModule metadata?
  • How do you implement cross-field validation?
  • Stand-alone components in Angular provide which primary benefit?
  • How do you mock services in Angular unit tests?
  • Which structure is recommended for organizing large Angular applications?
  • What is an Observable and how does the async pipe help in templates?
  • What is a primary benefit of using the async pipe in templates?
  • Which technique helps keep a large dynamic form performant?
  • Which service does HttpClientModule provide?
  • Using HttpOnly cookies for tokens helps protect against which threat?
  • Which statement describes creating an asynchronous validator for a reactive form?
  • Which change detection strategy reduces the number of cycles by checking for changes only when inputs change or events occur?
  • How do you validate forms on submit only?
  • What is a service in Angular and how does dependency injection provide a singleton instance?
  • How do you combine multiple API calls in RxJS?
  • How do you handle breaking Angular upgrades?
  • What approach helps enforce architectural boundaries?
  • To manage frontend dependencies across teams, which approach is effective?
  • What is an HTTP interceptor and typical use cases?
  • Which scenario best justifies using an impure pipe?
  • Which statement best describes cold vs hot observables?
  • Which feature would you use to access a child component or directive instance from a parent component class?
  • How do you enable and implement Angular animations?
  • Which of the following is included in secure token storage practices?
  • Which statement about Emulated encapsulation in Angular is true?
  • How are feature flags typically implemented in Angular apps?
  • What is the difference between take(1), first(), and takeUntil()?
  • When migrating from RxJS-heavy apps to a Signals-based approach, what is recommended?
  • How can you respond to route parameter changes without reinitializing the component?
  • Which decorator declares a property as an input binding from a parent component?
  • Which feature allows ngFor to track list items by identity to avoid unnecessary DOM re-creation?
  • Which guard asks for confirmation before leaving a route?
  • What is a service worker in Angular, and when is it used?
  • Which practices support role-based access control (RBAC) in Angular?
  • Where should you attach a cross-field validator in a reactive form to validate multiple controls together?
  • How do you upload and track file upload progress?
  • In Angular routing, what is a primary purpose of a resolver?
  • How do you manage frontend technical debt?
  • How do you handle technical disagreements on architecture?
  • What is the role of an Angular module (NgModule) and which metadata properties are commonly defined on it?
  • Which statement correctly describes Observables in contrast to Promises?
  • Which statement best describes the difference between a component's templateUrl/template and template and the difference between styleUrls/styles?
  • Which method disables a form control and updates its validity status?
  • Which mechanism ensures unused code is removed during build by analyzing ES modules and tooling?
  • When should you use the OnPush change detection strategy?
  • Which lifecycle hook is invoked just before a component is destroyed?
  • What is a key benefit of prerendering in Angular Universal?
  • What object is commonly used with @Output to emit events to the parent?
  • How do you securely store authentication tokens?
Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy