Free · Angular 22 · no sign-up
Angular 22 practice test
Original practice questions for Angular 22 developers covering components, signals, control flow, DI, routing, forms, HttpClient, zoneless change detection, SSR, and testing. Each answer cites angular.dev. Not an official Google or Angular exam.
The free timed mock has 50 questions, a 90-minute limit and a 70% pass mark. This is an unofficial practice format, not the format of any certification exam.
Every question is original, written for Angular 22 and linked to the angular.dev section it is based on.
- Free, no account
- Every answer cites its source
- No paywall on the full mock
Topics
18% of the mock30 free Signals
12% of the mock22 free Control flow and deferrable views
8% of the mock9 free Dependency injection
10% of the mock11 free Routing
10% of the mock12 free Forms
10% of the mock14 free HttpClient and data loading
8% of the mock15 free Change detection and zoneless
8% of the mock15 free SSR and hydration
6% of the mock15 free Testing
10% of the mock12 free
Browse practice questions
Components and templates (30)
- A developer is applying both a custom structural directive and a component to the same host element in an Angular template. They rely on the component's `ngOnInit` running strictly before the directive's `ngOnInit`. What is the safest architectural assumption to make regarding this execution order?
- A developer is building a component where a user's current theme setting is managed by an Angular signal. How must the developer access the theme value within the component's template to ensure the UI updates automatically when the signal changes?
- A developer is building a custom component that must reflect a value passed down from its parent. They use `input()` to define the property. Which statement accurately describes how this input value can be accessed within the child component's logic?
- A developer is building a custom UI component, `mapRenderer`, which implements a directive and uses `exportAs: 'mapRef'`. In their component template, they need to access the directive instance to call a method on it. Which syntax correctly provides access to the directive instance?
- A developer is building a dashboard component. They have created a reusable `DataCard` component with the selector `app-data-card`. To display this card within the main dashboard's template, what must the developer ensure?
Practice all 30 Components and templates questions one at a time
Signals (22)
- A developer is building a bidirectional temperature slider where the internal state is held in a Celsius signal. They use `linkedSignal` to derive the Fahrenheit display, ensuring that changing the Fahrenheit value automatically updates the underlying Celsius value. What is the primary mechanism that allows the Fahrenheit setter to modify the source Celsius signal?
- A developer is building a component that fetches user data using an Angular Resource. If the component's view needs to show a 'Retry' button, which resource status should they check to determine if the data fetching process has failed?
- A developer is building a component that needs to display real-time updates from a live data feed, like a WebSocket connection. They are using Angular's resource functionality. Which approach should they employ to ensure the signal automatically reflects every incoming data packet?
- A developer is building a data flow where a subsequent data fetch relies on an ID obtained from a preceding data service. If they use `resource.value()` directly within the `params` function of the downstream resource, what is the primary consequence according to best practices?
- A developer is creating an `effect` that must execute only when a user profile signal changes, even if another unrelated counter signal is read inside the effect's body. To ensure the counter's updates do not trigger the effect, what approach should be used when accessing the counter signal?
Control flow and deferrable views (9)
- A developer is building a dashboard widget that contains a complex charting component. They want this chart to load instantly as soon as the rest of the dashboard renders, rather than waiting for user interaction or a delay. Which directive configuration should they use?
- A front-end engineer is implementing a dashboard widget that should only load its heavy data visualization component when the user is not actively interacting with other parts of the application. Which mechanism should they use to ensure the component is not rendered until the browser is idle?
- A frontend engineer is optimizing a dashboard page where a complex, rarely-used charting widget is present. To ensure the page loads quickly for the initial view, how should they implement the charting widget's loading mechanism?
- A developer has a component, `LazyFeatureComponent`, which is not marked as standalone. They place this component inside an Angular `@defer` block in a parent template. What is the expected loading behavior for `LazyFeatureComponent`?
- A developer is implementing a lazy-loaded widget using `@defer`. They want to display a loading spinner immediately while the widget data fetches. If they include an `@placeholder` block, what is the key characteristic regarding the placeholder's dependencies?
Practice all 9 Control flow and deferrable views questions one at a time
Dependency injection (11)
- A developer is building a component that needs access to both the Angular Router and a custom logging service. To obtain these dependencies directly within the component class body in modern Angular, which mechanism should they utilize?
- A developer is building a highly specialized checkout component that requires a unique caching mechanism for its current transaction state, ensuring that an instance on one checkout page does not affect another. To achieve this necessary isolation, where should the developer register the state management service?
- A developer is building a large application and needs to ensure that a specific implementation of a service, like a custom LocationStrategy, is used across all parts of the application, even if individual modules might try to provide a different default. Where should this application-wide override be configured if the application is bootstrapped using `bootstrapApplication`?
- A developer is building a layered data access system where `BasicDataStore` relies on `AdvancedDataStore` to fetch supplemental data. How does the provided pattern ensure that `BasicDataStore` receives an instance of `AdvancedDataStore` when it is constructed?
- A development team is building a large Angular application and has several utility services. They are debating whether to register these services using the `providers` array within `ApplicationConfig` or by applying a specific decorator to the service class itself. Based on modern Angular practices, what is the recommended approach for these services?
Practice all 11 Dependency injection questions one at a time
Routing (12)
- An application needs to redirect visitors from '/menu' to either '/breakfast' or '/dinner' depending on the current time of day. How can a route definition support this dynamic redirect logic?
- Which combination of route details can a developer inspect directly on a route snapshot?
- A developer is comparing '<a href="https://www.angular.dev/essentials">' with a relative navigation path in an Angular app. What distinguishes an absolute URL from a relative URL?
- A component reads a route parameter from a route snapshot during initialization, then the user navigates to the same component with a different parameter value. Why does the displayed value fail to update?
- Inside a 'redirectTo' function, a developer tries to inspect the route's resolved title and lazy-loaded component on the 'ActivatedRouteSnapshot' argument, but they are unavailable. Why does this happen?
Forms (14)
- When breaking a large reactive FormGroup into smaller nested sections, what are the two steps outlined for setting up the nested form?
- When a developer calls a field function in Signal Forms inside a reactive computation, what does the returned FieldState object provide?
- A casting application must verify that a requested role is not already taken, but the list of active roles changes constantly in a central database. Why is an async validator appropriate here?
- A developer is converting a template-driven form that used required and minlength attributes into a reactive form. How are those same built-in validators accessed in a reactive form?
- A developer is designing a data model for Signal Forms and considers using custom class instances and Map objects for nested sections. What does Signal Forms require for the structural layer it walks to build the field tree?
HttpClient and data loading (15)
- What does adding withXhr() inside provideHttpClient(withXhr()) do in an Angular 22 application?
- A developer calls this.http.get('/api/items') inside a service method without subscribing to the returned value. What happens at runtime?
- A component has a required signal input userId and wants to automatically re-fetch user data whenever userId changes. Which definition uses httpResource correctly?
- A file-upload feature needs to display a live upload progress bar, but no upload progress events are arriving with the default HttpClient setup. Why?
- An HttpClient request fails because the backend returns a 500 error. How does HttpClient surface this failure to subscribers?
Practice all 15 HttpClient and data loading questions one at a time
Change detection and zoneless (15)
- In an Angular app, MainComponent uses OnPush and renders LoginComponent, which also uses OnPush. When Angular handles a click event inside LoginComponent, what happens to change detection?
- A developer authors this standalone component in Angular 22 without setting a changeDetection property in the @Component decorator. Which change detection strategy does Angular apply?
- During a code review of an Angular 22 test suite, a developer notices this TestBed setup. Is provideZonelessChangeDetection() required here to run the test with zoneless change detection?
- An engineering team is evaluating why removing ZoneJS improves runtime performance. Why does ZoneJS trigger application synchronization more often than needed?
- A library service is used inside an Angular 22 zoneless application. When watch() runs in the snippet below, why is this.measure() never called?
Practice all 15 Change detection and zoneless questions one at a time
SSR and hydration (15)
- A developer adds a hydrate on clause inside an Angular @defer block. What does the hydrate on clause control?
- Given this Angular 22 component used in an SSR application, how does Angular execute the callback passed to afterNextRender?
- An architect is explaining how Angular's incremental hydration works under the hood. Which three existing Angular capabilities does incremental hydration build upon?
- A developer configures Angular server routing so that public product pages render per request on the server while an internal admin dashboard renders strictly in the browser. Which API lets the developer assign these per-route strategies?
- During server-side rendering, an Angular 22 app uses HttpClient with the default fetch backend to download a 2.5 MB JSON catalog from an API, and the request fails. What caused the failure?
Testing (12)
- After registering provideHttpClientTesting() in TestBed, which token should a test inject to expect and answer outgoing HTTP requests?
- A developer already uses a stub to control what a dependency returns, but now needs to verify that the service under test invoked that dependency with specific arguments. Which test double should they use?
- Before running Vitest unit tests in a real browser for an Angular project, what setup step is required first?
- Given a ComponentFixture in an Angular component test, which property gives direct access to the component's root DOM element?
- In this functional HTTP interceptor, how does authInterceptor obtain an instance of AuthService?
Timed mock exam
The free mock draws 50 questions across the topics above (9/6/4/5/5/5/4/4/3/5), runs a 90-minute clock and scores you by topic. No account needed. Start the timed mock.
Topic weights: Unofficial practice blueprint (topic weights chosen by setupmycode exams, see tools/tech-pipeline/BLUEPRINTS.md). Written against Angular 22.3.0, the latest stable release on angular.dev and npm as of 2026-11-25. Google publishes no Angular certification exam.