Angular Developer Certification Exam — Questions and Answers
Question 1: Which validator ensures a control's value matches a given regular expression?
- Validators.format()
- Validators.pattern() (Correct answer)
- Validators.match()
- Validators.regex()
Correct answer: Validators.pattern()
`Validators.pattern()` accepts a string or RegExp and validates the control value against it.
Question 2: What are structural directives in Angular?
- Server-side rendering configurations
- Directives like *ngIf and *ngFor that change the DOM layout by adding or removing elements (Correct answer)
- CSS classes applied to style elements
- TypeScript interfaces for data models
Correct answer: Directives like *ngIf and *ngFor that change the DOM layout by adding or removing elements
Structural directives (*ngIf, *ngFor, *ngSwitch) modify the DOM structure by conditionally adding, removing, or manipulating HTML elements based on expressions.
Question 3: What is the importance of professional networking in Angular development?
- Networking only benefits entry-level professionals
- Networking is a waste of time for established professionals
- Building relationships with peers enables knowledge sharing, professional development, and career advancement (Correct answer)
- Only online networking has value
Correct answer: Building relationships with peers enables knowledge sharing, professional development, and career advancement
Professional networks provide opportunities for knowledge exchange, mentorship, collaboration, and staying informed about industry trends and opportunities.
Question 4: What is the role of the `@Self()` decorator in Angular DI?
- It restricts resolution to the injector of the current element, never walking up to parent injectors (Correct answer)
- It marks a service as a singleton
- It injects the current component instance into itself
- It creates a new instance of the service for each use
Correct answer: It restricts resolution to the injector of the current element, never walking up to parent injectors
@Self() tells Angular to look for the dependency only in the host element's injector and throw if it's not found there.
Question 5: What is the purpose of the router outlet?
- A placeholder directive in the template where routed components are dynamically rendered (Correct answer)
- An output stream for logging
- A CSS container for overflow content
- A power outlet for charging devices
Correct answer: A placeholder directive in the template where routed components are dynamically rendered
The <router-outlet> directive acts as a placeholder in the layout template where the Angular Router dynamically renders the component matching the current URL path.
Question 6: What is the purpose of the <router-outlet name="sidebar"> syntax in Angular templates?
- It sets the default outlet for all child routes
- It restricts which routes can render in that outlet
- It creates a secondary or auxiliary named outlet for rendering sibling routes (Correct answer)
- It enables lazy loading for that outlet's routes
Correct answer: It creates a secondary or auxiliary named outlet for rendering sibling routes
Named outlets (auxiliary outlets) allow multiple independent router outlets to be active simultaneously, each rendering different routes.
Question 7: How should Angular professionals approach client or stakeholder communication?
- Use clear, professional language appropriate to the audience, confirm understanding, and document key communications (Correct answer)
- Communication skills are unimportant for technical professionals
- Only communicate in writing, never verbally
- Use technical jargon regardless of the audience
Correct answer: Use clear, professional language appropriate to the audience, confirm understanding, and document key communications
Effective communication tailored to the audience's knowledge level is essential for building trust, ensuring understanding, and achieving professional objectives.
Question 8: Which function converts an RxJS Observable into an Angular Signal?
- fromSignal()
- toSignal() (Correct answer)
- signalFrom()
- toObservable()
Correct answer: toSignal()
toSignal() from @angular/core/rxjs-interop subscribes to an Observable and exposes its latest value as a Signal.
Question 9: Which property would you check to know if a reactive form control has been changed by the user but not yet submitted?
- changed
- touched
- dirty (Correct answer)
- modified
Correct answer: dirty
`dirty` is `true` when the user has changed the control's value since it was last reset.
Question 10: What is the difference between a service and a component in Angular?
- Services render HTML; components do not
- Components manage UI and views; services contain reusable business logic and data access (Correct answer)
- Components are only used on the server side
- There is no difference
Correct answer: Components manage UI and views; services contain reusable business logic and data access
Components are responsible for presenting the user interface and handling user interactions, while services encapsulate reusable logic, data access, and cross-cutting concerns shared across components.
Question 11: Why is it important to unsubscribe from Observables?
- To improve the speed of the Observable
- To prevent memory leaks by cleaning up subscriptions that are no longer needed (Correct answer)
- To reset the Observable to its initial value
- Unsubscribing is never necessary in Angular
Correct answer: To prevent memory leaks by cleaning up subscriptions that are no longer needed
Failing to unsubscribe from Observables (especially those that don't complete naturally) creates memory leaks, as the subscription continues holding references and processing emissions.
Question 12: What is the purpose of the Validators class?
- Validates Angular application architecture
- Validates server-side API responses
- Validates CSS stylesheets for errors
- Provides built-in validation functions like required, minLength, maxLength, and pattern (Correct answer)
Correct answer: Provides built-in validation functions like required, minLength, maxLength, and pattern
The Validators class provides commonly needed validation functions that can be applied to form controls, including required, min, max, minLength, maxLength, email, and pattern.
Question 13: What Angular pipe should you use to avoid repeated heavy computations in templates?
- async
- Impure custom pipe
- Pure custom pipe (Correct answer)
- json
Correct 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.
Question 14: Which Angular feature delays loading a module until a user navigates to its associated route?
- Tree-shaking
- Pre-fetching
- Lazy loading (Correct answer)
- Ahead-of-Time compilation
Correct answer: Lazy loading
Lazy loading uses the loadChildren property in routing config to split a module into a separate chunk downloaded on demand.
Question 15: Which Angular PWA feature caches assets and API responses for offline use?
- Service Worker via @angular/pwa (Correct answer)
- HttpInterceptor
- Angular Universal
- Zone.js
Correct 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.
Question 16: What's the ideal way to set child URL routes?
- Important them at runtime
- In the browser object
- In the component
- In the routes array (Correct answer)
Correct answer: In the routes array
Explanation: <br> To define child routes, just add an array of new route configuration objects to your parent configuration's children key.
Question 17: What is the correct way to apply multiple CSS classes conditionally using `[ngClass]`?
- [ngClass]="{ 'class1': cond1, 'class2': cond2 }" (Correct answer)
- [ngClass]="cond1 && cond2"
- [ngClass]="'class1 class2'"
- [ngClass]="[cond1, cond2]"
Correct answer: [ngClass]="{ 'class1': cond1, 'class2': cond2 }"
Passing an object literal to [ngClass] where each key is a class name and the value is a boolean expression is the standard pattern.
Question 18: What is the return type of a valid (passing) custom validator function?
- null (Correct answer)
- { valid: true }
- undefined
- false
Correct answer: null
A validator must return `null` when the control is valid; any non-null object signals an error.
Question 19: How do you declare factory dependencies when using `useFactory`?
- Provide them via the `deps` array in the provider definition (Correct answer)
- Declare them in a separate `imports` field of the provider
- List them as constructor parameters of the factory function
- Inject them using @Inject inside the factory body
Correct answer: Provide them via the `deps` array in the provider definition
The deps array in the provider object lists the tokens Angular resolves and passes as arguments to the factory function in order.
Question 20: Which provider syntax uses an existing service instance to satisfy a different token?
- { provide: X, useExisting: Y } (Correct answer)
- { provide: X, useClass: Y }
- { provide: X, useValue: Y }
- { provide: X, useFactory: () => new Y() }
Correct answer: { provide: X, useExisting: Y }
useExisting creates an alias so that token X resolves to the same instance already registered under token Y.
Question 21: What does Ahead-of-Time (AOT) compilation do in Angular?
- Compiles templates and TypeScript during the build step (Correct answer)
- Defers compilation until first user interaction
- Compiles templates in the browser at runtime
- Compiles only lazy-loaded modules
Correct 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.
Question 22: Which Angular decorator marks a class as available to the DI system as a provider?
- @Component
- @Injectable (Correct answer)
- @NgModule
- @Inject
Correct answer: @Injectable
@Injectable marks a class so Angular's DI system knows it can be injected and, if needed, also inject its own dependencies.
Question 23: What is the async pipe in Angular templates?
- A pipe for asynchronous CSS rendering
- A pipe for connecting to async database queries
- A pipe for processing files uploaded asynchronously
- A pipe that automatically subscribes to an Observable, displays the latest value, and unsubscribes on destroy (Correct answer)
Correct answer: A pipe that automatically subscribes to an Observable, displays the latest value, and unsubscribes on destroy
The async pipe subscribes to an Observable or Promise in the template, renders the latest emitted value, and automatically unsubscribes when the component is destroyed, preventing memory leaks.
Question 24: What does the pipe() method do in RxJS?
- Creates a new subscription to an Observable
- Sends data through a physical pipe system
- Chains multiple operators together to transform, filter, or combine Observable streams (Correct answer)
- Connects to a Unix pipe for command-line operations
Correct answer: Chains multiple operators together to transform, filter, or combine Observable streams
The pipe() method allows composing multiple RxJS operators (map, filter, switchMap, etc.) into a processing pipeline that transforms the Observable stream.
Question 25: What is the ActivatedRoute service?
- A service for tracking user activity
- A service for managing active database connections
- A service that activates inactive users
- A service providing access to route parameters, query parameters, and other route information (Correct answer)
Correct answer: A service providing access to route parameters, query parameters, and other route information
ActivatedRoute provides information about the route associated with the loaded component, including route parameters, query strings, URL fragments, and resolved data.
Question 26: What happens when a CanActivate guard returns an UrlTree instead of false?
- An error is thrown at runtime
- Navigation is cancelled and no redirect occurs
- Navigation proceeds normally to the requested route
- Navigation is cancelled and the router redirects to the URL represented by the UrlTree (Correct answer)
Correct answer: Navigation is cancelled and the router redirects to the URL represented by the UrlTree
Returning a UrlTree from a guard cancels the current navigation and immediately starts a new navigation to the URL encoded in that UrlTree.
Question 27: What is the switchMap operator used for?
- To map values from one data type to another
- To toggle a boolean value in the stream
- To switch between different programming languages
- To cancel the previous inner Observable and subscribe to a new one when the source emits (Correct answer)
Correct answer: To cancel the previous inner Observable and subscribe to a new one when the source emits
switchMap maps each source value to an inner Observable, automatically unsubscribing from the previous inner Observable when a new source value arrives, preventing stale requests.
Question 28: What is the most critical compliance requirement in Angular development?
- Following all applicable federal and state regulations while maintaining detailed documentation (Correct answer)
- Compliance is optional for certified professionals
- Only following regulations when audited
- Ignoring regulations to save time
Correct answer: Following all applicable federal and state regulations while maintaining detailed documentation
Compliance with applicable regulations is fundamental to professional practice, requiring knowledge of current requirements and meticulous documentation.
Question 29: Which Angular strategy checks only the current component and its ancestors when an input reference changes?
- Detached
- Default
- Manual
- OnPush (Correct answer)
Correct answer: OnPush
OnPush change detection only runs for a component when its input references change, an event originates from it, or an async pipe resolves.
Question 30: What career advancement paths exist for Angular certified professionals?
- Leadership roles, specialized consulting, education and training, and executive management positions (Correct answer)
- Advancement requires leaving the field entirely
- Only changing careers provides advancement
- No advancement is possible beyond initial certification
Correct answer: Leadership roles, specialized consulting, education and training, and executive management positions
Certified professionals can advance through specialization, leadership roles, consulting, academic/training positions, and executive management within their field.
Question 31: What is the importance of peer review in angular development?
- Peer review is unnecessary for experienced professionals
- Peer review undermines professional confidence
- Peer review ensures quality, catches errors, provides learning opportunities, and maintains professional standards (Correct answer)
- Only management should review professional work
Correct answer: Peer review ensures quality, catches errors, provides learning opportunities, and maintains professional standards
Peer review is a cornerstone of professional quality assurance, providing independent verification, knowledge sharing, and continuous improvement opportunities.
Question 32: How does continuing education benefit Angular professionals?
- It ensures practitioners stay current with evolving standards, technologies, and best practices (Correct answer)
- Continuing education is not needed after certification
- Continuing education is purely optional with no benefits
- Only beginners benefit from additional training
Correct answer: It ensures practitioners stay current with evolving standards, technologies, and best practices
Professional fields evolve constantly — continuing education ensures practitioners maintain competence and stay current with industry developments.
Question 33: How do you pass parameters in Angular routes?
- Only through local storage
- Using path parameters (:id), query parameters (?key=value), or route data (Correct answer)
- Parameters cannot be passed in Angular routes
- Only through global variables
Correct answer: Using path parameters (:id), query parameters (?key=value), or route data
Angular supports path parameters (/user/:id), query parameters (/search?term=angular), and resolved route data for passing information to routed components.
Question 34: What Angular decorator is used to mark a class as a route guard implementing CanActivate?
- @Directive()
- @Injectable() (Correct answer)
- @Component()
- @Guard()
Correct answer: @Injectable()
Route guards are Angular services decorated with @Injectable(), allowing them to be injected into the router's DI system.
Question 35: What documentation best practices should Angular professionals follow?
- Brief notes are always sufficient
- Maintain thorough, accurate, timely records that support findings, decisions, and compliance requirements (Correct answer)
- Documentation can be completed months after the work
- Documentation is only needed for billing purposes
Correct answer: Maintain thorough, accurate, timely records that support findings, decisions, and compliance requirements
Comprehensive documentation provides an audit trail, supports decision-making, facilitates knowledge transfer, and demonstrates compliance with professional standards.
Question 36: What Angular token is used with `multi: true` to run initialization logic before the app bootstraps?
- PLATFORM_INITIALIZER
- APP_INITIALIZER (Correct answer)
- APP_BOOTSTRAP_LISTENER
- DOCUMENT
Correct answer: APP_INITIALIZER
APP_INITIALIZER accepts factory functions via multi: true; Angular awaits any returned Promises before rendering the first component.
Question 37: In a cross-field validator, where should you attach the validator to validate that `password` and `confirmPassword` match?
- On the confirmPassword FormControl
- On the password FormControl
- On the parent FormGroup (Correct answer)
- On both controls individually
Correct answer: On the parent FormGroup
Cross-field validators are attached to the FormGroup so they have access to all sibling controls.
Question 38: What is the purpose of the computed() function in Angular Signals?
- Convert an Observable to a signal
- Create a writable signal
- Derive a read-only value from one or more signals (Correct answer)
- Run side effects when signals change
Correct answer: Derive a read-only value from one or more signals
computed() creates a lazily evaluated, memoized read-only signal derived from other signals.
Question 39: What does `@ContentChildren(ItemComponent)` return inside a component?
- A QueryList of all projected ItemComponent instances (Correct answer)
- The first projected ItemComponent instance
- The template reference of the content slot
- A static array of child component factories
Correct answer: A QueryList of all projected ItemComponent instances
@ContentChildren queries projected content and returns a live QueryList containing all matching component or directive instances.
Question 40: What is an Observable in Angular/RxJS?
- A lazy collection of values that can emit multiple items over time and be subscribed to (Correct answer)
- A database query result set
- A CSS animation sequence
- A visual component for displaying data
Correct answer: A lazy collection of values that can emit multiple items over time and be subscribed to
An Observable represents a stream of values over time, producing data only when subscribed to (lazy evaluation), and can emit zero or more values before completing or erroring.
Question 41: In Angular's template, what does the safe navigation operator (`?.`) prevent?
- Circular dependency errors
- Infinite change detection loops
- XSS injection in interpolated values
- Null or undefined property access that would throw an error (Correct answer)
Correct answer: Null or undefined property access that would throw an error
The ?. operator short-circuits the expression if the left-hand side is null or undefined, preventing template errors.
Question 42: What is the difference between a Subject and an Observable?
- A Subject is both an Observable and an Observer — it can emit values and be subscribed to (Correct answer)
- Observables can push values while Subjects cannot
- They are identical in every way
- Subjects can only emit one value
Correct answer: A Subject is both an Observable and an Observer — it can emit values and be subscribed to
A Subject is multicast (multiple subscribers), can manually emit values using next(), and acts as both an Observable (can be subscribed to) and an Observer (can receive values).
Question 43: What ethical standards guide Angular professionals in their work?
- Maximizing personal profit is the primary ethical obligation
- Ethics only apply when clients are watching
- Integrity, objectivity, confidentiality, and professional competence in all engagements (Correct answer)
- Ethical standards are suggestions, not requirements
Correct answer: Integrity, objectivity, confidentiality, and professional competence in all engagements
Professional ethics require maintaining the highest standards of integrity, objectivity, and confidentiality while continuously developing competence.
Question 44: What qualifications are needed for advanced angular development practice?
- Advanced certifications, specialized training, demonstrated experience, and ongoing professional development (Correct answer)
- Advanced practice requires no formal credentials
- No additional qualifications beyond initial certification
- Only a college degree in any subject
Correct answer: Advanced certifications, specialized training, demonstrated experience, and ongoing professional development
Advanced practice requires building upon foundational knowledge through specialized certifications, targeted training, and demonstrated competence in specific areas.
Question 45: Which Angular Signals API schedules a side effect that reruns whenever its dependent signals change?
- signal()
- toSignal()
- effect() (Correct answer)
- computed()
Correct answer: effect()
effect() registers a reactive side effect that Angular automatically re-executes whenever any signal it reads changes.
Question 46: What is the effect of calling `control.clearValidators()` followed by `control.updateValueAndValidity()`?
- Only affects async validators
- Throws an error if the control currently has errors
- Removes all sync validators and immediately re-evaluates the control, making it valid (Correct answer)
- Removes validators but keeps the existing error map until the next user interaction
Correct answer: Removes all sync validators and immediately re-evaluates the control, making it valid
`clearValidators()` detaches all sync validators, and `updateValueAndValidity()` forces re-evaluation so the control becomes valid (assuming no async errors).
Question 47: Which `providers` syntax allows you to supply a pre-constructed object or primitive value directly?
- { provide: TOKEN, useClass: MyClass }
- { provide: TOKEN, useExisting: OtherToken }
- { provide: TOKEN, useFactory: factoryFn }
- { provide: TOKEN, useValue: myObject } (Correct answer)
Correct answer: { provide: TOKEN, useValue: myObject }
useValue registers a static, pre-built value with the injector so no factory or class instantiation occurs.
Question 48: What Angular CLI flag enables differential loading to serve modern ES2015+ bundles to modern browsers and ES5 to legacy ones?
- --differential
- --target es5
- --es5BrowserSupport (deprecated, now automatic via browserslist) (Correct answer)
- --legacy
Correct 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.
Question 49: Which technique splits a large Angular app into multiple smaller JavaScript files downloaded in parallel?
- Code splitting (Correct answer)
- Tree-shaking
- Gzip compression
- Minification
Correct answer: Code splitting
Code splitting divides the application into chunks—typically per lazy-loaded route—so only the code needed for the current view is downloaded.
Question 50: What NgRx operator is used inside createEffect() to handle errors without killing the effect stream?
- catchError with EMPTY or of() (Correct answer)
- finalize()
- retry()
- throwError()
Correct answer: catchError with EMPTY or of()
Using catchError inside the inner Observable (not the outer stream) and returning EMPTY or a fallback action keeps the effect alive after an error.
Angular Developer Certification Exam
The Angular Developer Certification, created by Google Developer Experts via certificates.dev, validates proficiency in building Angular applications including components, services, routing, forms, RxJS, state management, and testing.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds
Practice questions written with AI assistance and published by Nathan Beja, founder of Practice Test Geeks. They are not real exam questions. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Editorial policy