Angular Interview Master

Accelerate your career with 200+ Professional Questions from Beginner to Architect level.

0 / 200 LearnedSignals & RxJSStandalone & SSR
Showing 200 questions in All Questions . Keep pushing, you're doing great!
1
What is Angular?
Beginner

Angular is a platform and framework for building single-page client applications using HTML and TypeScript. It is developed and maintained by Google a...

Expert Explanation:

Angular is a platform and framework for building single-page client applications using HTML and TypeScript. It is developed and maintained by Google and provides a set of tools for building scalable and high-performance web applications.

Copy Description beginner
2
What are the key features of Angular?
Beginner

Key features include Component-based architecture, Two-way data binding, Dependency Injection, Templates, Directives, Pipes, Routing, and RxJS integra...

Expert Explanation:

Key features include Component-based architecture, Two-way data binding, Dependency Injection, Templates, Directives, Pipes, Routing, and RxJS integration.

Copy Description beginner
3
What is TypeScript?
Beginner

TypeScript is a superset of JavaScript that adds static typing. Angular is built with TypeScript, which provides better tooling, refactoring capabilit...

Expert Explanation:

TypeScript is a superset of JavaScript that adds static typing. Angular is built with TypeScript, which provides better tooling, refactoring capabilities, and helps catch errors at compile-time.

Copy Description beginner
4
What is a Component in Angular?
Beginner

A component is the fundamental building block of an Angular application. It consists of a TypeScript class (logic), an HTML template (view), and CSS s...

Expert Explanation:

A component is the fundamental building block of an Angular application. It consists of a TypeScript class (logic), an HTML template (view), and CSS styles.

Copy Description beginner
5
What is a Template?
Beginner

A template is a form of HTML that tells Angular how to render the component's view. It uses special syntax like {{ }} for interpolation and [ ] for pr...

Expert Explanation:

A template is a form of HTML that tells Angular how to render the component's view. It uses special syntax like {{ }} for interpolation and [ ] for property binding.

Copy Description beginner
6
What is Data Binding?
Beginner

Data binding is a mechanism that allows communication between the component's class and its template. Types include Interpolation, Property Binding, E...

Expert Explanation:

Data binding is a mechanism that allows communication between the component's class and its template. Types include Interpolation, Property Binding, Event Binding, and Two-way Data Binding.

Copy Description beginner
7
Difference between Angular and AngularJS?
Beginner

AngularJS is the 1.x version based on JavaScript. Angular (2+) is a complete rewrite based on TypeScript, featuring a component-based architecture, be...

Expert Explanation:

AngularJS is the 1.x version based on JavaScript. Angular (2+) is a complete rewrite based on TypeScript, featuring a component-based architecture, better performance, and mobile support.

Copy Description beginner
8
What are Directives?
Beginner

Directives are markers on a DOM element that tell Angular to attach behavior to it. There are three types: Component Directives, Structural Directives...

Expert Explanation:

Directives are markers on a DOM element that tell Angular to attach behavior to it. There are three types: Component Directives, Structural Directives (*ngIf, *ngFor), and Attribute Directives (ngClass, ngStyle).

Copy Description beginner
9
What is an Angular Module (@NgModule)?
Beginner

An NgModule is a decorator that describes how the application parts fit together. It declares components, directives, and pipes, and imports other mod...

Expert Explanation:

An NgModule is a decorator that describes how the application parts fit together. It declares components, directives, and pipes, and imports other modules.

Copy Description beginner
10
What is Dependency Injection?
Beginner

Dependency Injection (DI) is a design pattern where a class requests dependencies from external sources rather than creating them. Angular's DI system...

Expert Explanation:

Dependency Injection (DI) is a design pattern where a class requests dependencies from external sources rather than creating them. Angular's DI system provides instances of services to components.

Copy Description beginner
11
What are Pipes in Angular?
Beginner

Pipes are simple functions used in templates to transform data for display. Examples include DatePipe, UpperCasePipe, and CurrencyPipe.

Expert Explanation:

Pipes are simple functions used in templates to transform data for display. Examples include DatePipe, UpperCasePipe, and CurrencyPipe.

Copy Description beginner
12
What is the purpose of the 'async' pipe?
Beginner

The async pipe automatically subscribes to an Observable or Promise and returns the latest value it has emitted. It also automatically unsubscribes wh...

Expert Explanation:

The async pipe automatically subscribes to an Observable or Promise and returns the latest value it has emitted. It also automatically unsubscribes when the component is destroyed.

Copy Description beginner
13
What is Interpolation?
Beginner

Interpolation allows you to embed expressions into HTML templates using double curly braces {{ expression }}. Angular evaluates the expression and con...

Expert Explanation:

Interpolation allows you to embed expressions into HTML templates using double curly braces {{ expression }}. Angular evaluates the expression and converts the result to text.

Copy Description beginner
14
What is Property Binding?
Beginner

Property binding [property]="value" allows you to set properties of HTML elements or directives. It is a one-way data binding from component to view.

Expert Explanation:

Property binding [property]="value" allows you to set properties of HTML elements or directives. It is a one-way data binding from component to view.

Copy Description beginner
15
What is Event Binding?
Beginner

Event binding (event)="handler()" allows you to listen for and respond to user actions such as keystrokes, mouse movements, clicks, and touches.

Expert Explanation:

Event binding (event)="handler()" allows you to listen for and respond to user actions such as keystrokes, mouse movements, clicks, and touches.

Copy Description beginner
16
What is Two-way Data Binding?
Beginner

Two-way data binding [(ngModel)]="property" combines property and event binding. Changes in the component update the view, and changes in the view upd...

Expert Explanation:

Two-way data binding [(ngModel)]="property" combines property and event binding. Changes in the component update the view, and changes in the view update the component.

Copy Description beginner
17
What is a Service in Angular?
Beginner

A service is a class with a specific purpose (e.g., fetching data, logging). It is typically decorated with @Injectable() and shared across components...

Expert Explanation:

A service is a class with a specific purpose (e.g., fetching data, logging). It is typically decorated with @Injectable() and shared across components via DI.

Copy Description beginner
18
What is the @Injectable() decorator?
Beginner

It marks a class as available to be provided and injected as a dependency. The 'providedIn: root' property makes it a singleton across the app.

Expert Explanation:

It marks a class as available to be provided and injected as a dependency. The 'providedIn: root' property makes it a singleton across the app.

Copy Description beginner
19
Explain Angular Life Cycle Hooks.
Beginner

Angular provides hooks like ngOnInit, ngOnChanges, ngAfterViewInit, and ngOnDestroy to tap into key events in a component's lifecycle.

Expert Explanation:

Angular provides hooks like ngOnInit, ngOnChanges, ngAfterViewInit, and ngOnDestroy to tap into key events in a component's lifecycle.

Copy Description beginner
20
What is ngOnInit()?
Beginner

ngOnInit is a lifecycle hook called after Angular has initialized all data-bound properties. It is the best place for initialization logic (e.g., API ...

Expert Explanation:

ngOnInit is a lifecycle hook called after Angular has initialized all data-bound properties. It is the best place for initialization logic (e.g., API calls).

Copy Description beginner
21
What is ngOnDestroy()?
Beginner

ngOnDestroy is a hook called just before Angular destroys the component. It is used for cleanup, such as unsubscribing from Observables and detaching ...

Expert Explanation:

ngOnDestroy is a hook called just before Angular destroys the component. It is used for cleanup, such as unsubscribing from Observables and detaching event handlers.

Copy Description beginner
22
What is the Angular CLI?
Beginner

The Angular Command Line Interface (CLI) is a tool used to initialize, develop, scaffold, and maintain Angular applications directly from a command sh...

Expert Explanation:

The Angular Command Line Interface (CLI) is a tool used to initialize, develop, scaffold, and maintain Angular applications directly from a command shell.

Copy Description beginner
23
How do you create a component using CLI?
Beginner

Use the command: ng generate component component-name (or ng g c component-name).

Expert Explanation:

Use the command: ng generate component component-name (or ng g c component-name).

Copy Description beginner
24
What is a Single Page Application (SPA)?
Beginner

An SPA is a web application that interacts with the user by dynamically rewriting the current page rather than loading entire new pages from a server.

Expert Explanation:

An SPA is a web application that interacts with the user by dynamically rewriting the current page rather than loading entire new pages from a server.

Copy Description beginner
25
What is the purpose of main.ts?
Beginner

main.ts is the entry point of the Angular application. It bootstraps the root module (usually AppModule) to start the app.

Expert Explanation:

main.ts is the entry point of the Angular application. It bootstraps the root module (usually AppModule) to start the app.

Copy Description beginner
26
What is the purpose of polyfills.ts?
Beginner

Polyfills are scripts that provide modern functionality on older browsers that do not natively support it.

Expert Explanation:

Polyfills are scripts that provide modern functionality on older browsers that do not natively support it.

Copy Description beginner
27
What is a Selector?
Beginner

A selector is a CSS selector that tells Angular where to instantiate a component in the HTML template. Example: selector: 'app-root'.

Expert Explanation:

A selector is a CSS selector that tells Angular where to instantiate a component in the HTML template. Example: selector: 'app-root'.

Copy Description beginner
28
What is bootstrapping in Angular?
Beginner

Bootstrapping is the process of initializing and launching the Angular application by loading the root module and root component.

Expert Explanation:

Bootstrapping is the process of initializing and launching the Angular application by loading the root module and root component.

Copy Description beginner
29
What is @Input() decorator?
Beginner

@Input() allows a parent component to pass data to a child component.

Expert Explanation:

@Input() allows a parent component to pass data to a child component.

Copy Description beginner
30
What is @Output() decorator?
Beginner

@Output() allows a child component to emit events to its parent component, typically using an EventEmitter.

Expert Explanation:

@Output() allows a child component to emit events to its parent component, typically using an EventEmitter.

Copy Description beginner
31
What is EventEmitter?
Beginner

EventEmitter is a class used in Angular components to emit custom events that a parent component can listen to via event binding.

Expert Explanation:

EventEmitter is a class used in Angular components to emit custom events that a parent component can listen to via event binding.

Copy Description beginner
32
What are Structural Directives?
Beginner

Structural directives change the DOM layout by adding or removing elements. Common examples are *ngIf (conditional) and *ngFor (looping).

Expert Explanation:

Structural directives change the DOM layout by adding or removing elements. Common examples are *ngIf (conditional) and *ngFor (looping).

Copy Description beginner
33
What are Attribute Directives?
Beginner

Attribute directives change the appearance or behavior of an existing element. Examples include ngClass and ngStyle.

Expert Explanation:

Attribute directives change the appearance or behavior of an existing element. Examples include ngClass and ngStyle.

Copy Description beginner
34
Difference between *ngIf and hidden property?
Beginner

*ngIf removes/adds the element from the DOM entirely, while the 'hidden' property merely hides it via CSS (display: none), keeping it in the DOM.

Expert Explanation:

*ngIf removes/adds the element from the DOM entirely, while the 'hidden' property merely hides it via CSS (display: none), keeping it in the DOM.

Copy Description beginner
35
What is the purpose of index.html?
Beginner

index.html is the main HTML file that is served when someone visits your site. It contains the root component selector where the app is injected.

Expert Explanation:

index.html is the main HTML file that is served when someone visits your site. It contains the root component selector where the app is injected.

Copy Description beginner
36
What is package.json?
Beginner

package.json lists the dependencies and scripts required for the project. It is used by npm or yarn to manage library versions.

Expert Explanation:

package.json lists the dependencies and scripts required for the project. It is used by npm or yarn to manage library versions.

Copy Description beginner
37
What is angular.json?
Beginner

angular.json is the configuration file for the Angular CLI. It defines build, test, and serve settings for the workspace.

Expert Explanation:

angular.json is the configuration file for the Angular CLI. It defines build, test, and serve settings for the workspace.

Copy Description beginner
38
What is a constructor?
Beginner

The constructor is a standard TypeScript class method called when the class is instantiated. In Angular, it is primarily used for Dependency Injection...

Expert Explanation:

The constructor is a standard TypeScript class method called when the class is instantiated. In Angular, it is primarily used for Dependency Injection.

Copy Description beginner
39
Difference between constructor and ngOnInit?
Beginner

The constructor is for DI; ngOnInit is for Angular-specific initialization. Inputs are not available in the constructor but are available in ngOnInit.

Expert Explanation:

The constructor is for DI; ngOnInit is for Angular-specific initialization. Inputs are not available in the constructor but are available in ngOnInit.

Copy Description beginner
40
How to perform an HTTP request in Angular?
Beginner

Use the HttpClient service provided in HttpClientModule. It returns Observables for handling asynchronous data.

Expert Explanation:

Use the HttpClient service provided in HttpClientModule. It returns Observables for handling asynchronous data.

Copy Description beginner
41
What is an Observable?
Beginner

An Observable is a stream of data that can be observed over time. It is part of the RxJS library and is used extensively in Angular for handling async...

Expert Explanation:

An Observable is a stream of data that can be observed over time. It is part of the RxJS library and is used extensively in Angular for handling async operations.

Copy Description beginner
42
What is the subscribe() method?
Beginner

The subscribe() method is used to listen to an Observable. The callback function provided to subscribe is executed whenever the Observable emits a new...

Expert Explanation:

The subscribe() method is used to listen to an Observable. The callback function provided to subscribe is executed whenever the Observable emits a new value.

Copy Description beginner
43
How to handle errors in HTTP requests?
Beginner

Errors can be handled using the catchError operator from RxJS or by providing an error callback to the subscribe() method.

Expert Explanation:

Errors can be handled using the catchError operator from RxJS or by providing an error callback to the subscribe() method.

Copy Description beginner
44
What is a Promise?
Beginner

A Promise is a JavaScript object representing the eventual completion (or failure) of an asynchronous operation and its resulting value.

Expert Explanation:

A Promise is a JavaScript object representing the eventual completion (or failure) of an asynchronous operation and its resulting value.

Copy Description beginner
45
Observable vs Promise?
Beginner

Observables are lazy, cancellable, and handle multiple values. Promises are eager, not cancellable, and handle only a single value.

Expert Explanation:

Observables are lazy, cancellable, and handle multiple values. Promises are eager, not cancellable, and handle only a single value.

Copy Description beginner
46
What is Routing in Angular?
Beginner

Routing allows navigating between different views or components based on the URL in the browser's address bar.

Expert Explanation:

Routing allows navigating between different views or components based on the URL in the browser's address bar.

Copy Description beginner
47
What is router-outlet?
Beginner

The <router-outlet> is a directive that acts as a placeholder where Angular dynamically inserts the component matched by the current route.

Expert Explanation:

The <router-outlet> is a directive that acts as a placeholder where Angular dynamically inserts the component matched by the current route.

Copy Description beginner
48
What is routerLink?
Beginner

routerLink is a directive used to link to different routes in an Angular application. It is preferred over 'href' because it prevents a full page relo...

Expert Explanation:

routerLink is a directive used to link to different routes in an Angular application. It is preferred over 'href' because it prevents a full page reload.

Copy Description beginner
49
What is an Interceptor?
Beginner

An HTTP Interceptor is a service that can inspect or transform HTTP requests and responses globally before they reach the server or the app.

Expert Explanation:

An HTTP Interceptor is a service that can inspect or transform HTTP requests and responses globally before they reach the server or the app.

Copy Description beginner
50
What is ViewEncapsulation?
Beginner

ViewEncapsulation determines whether the styles defined in a component will affect the whole application or just that specific component. Options incl...

Expert Explanation:

ViewEncapsulation determines whether the styles defined in a component will affect the whole application or just that specific component. Options include Emulated, None, and ShadowDom.

Copy Description beginner
51
Difference between Reactive Forms and Template-driven Forms?
Experience

Template-driven forms are easy to use but harder to test and scale (using ngModel). Reactive forms are more robust, scalable, and testable, offering s...

Expert Explanation:

Template-driven forms are easy to use but harder to test and scale (using ngModel). Reactive forms are more robust, scalable, and testable, offering synchronous access to data models.

Copy Description experience
52
What is the purpose of FormBuilder?
Experience

FormBuilder is a syntactic sugar service that provides convenient methods for generating instances of FormControl, FormGroup, and FormArray.

Expert Explanation:

FormBuilder is a syntactic sugar service that provides convenient methods for generating instances of FormControl, FormGroup, and FormArray.

Copy Description experience
53
What is FormArray?
Experience

FormArray is a class that tracks the value and validity state of an array of FormControl, FormGroup, or FormArray instances. It is useful for dynamic ...

Expert Explanation:

FormArray is a class that tracks the value and validity state of an array of FormControl, FormGroup, or FormArray instances. It is useful for dynamic lists of form fields.

Copy Description experience
54
Explain Angular Dependency Injection hierarchy.
Experience

Angular DI is hierarchical. If a dependency isn't found in the component's injector, it looks up to parent components, then to the module/root level. ...

Expert Explanation:

Angular DI is hierarchical. If a dependency isn't found in the component's injector, it looks up to parent components, then to the module/root level. 'providedIn: root' creates a singleton.

Copy Description experience
55
What are Route Guards?
Experience

Guards are interfaces that can permit or deny navigation to a route. Common guards include CanActivate, CanDeactivate, Resolve, and CanMatch (modern r...

Expert Explanation:

Guards are interfaces that can permit or deny navigation to a route. Common guards include CanActivate, CanDeactivate, Resolve, and CanMatch (modern replacement for CanLoad).

Copy Description experience
56
What is Lazy Loading?
Experience

Lazy loading is a technique that loads NgModules only when they are needed (e.g., when a user navigates to a specific route), reducing initial bundle ...

Expert Explanation:

Lazy loading is a technique that loads NgModules only when they are needed (e.g., when a user navigates to a specific route), reducing initial bundle size and improving load time.

Copy Description experience
57
How to implement Lazy Loading?
Experience

Use the 'loadChildren' property in route configuration with an arrow function: loadChildren: () => import('./module-path').then(m => m.ModuleName).

Expert Explanation:

Use the 'loadChildren' property in route configuration with an arrow function: loadChildren: () => import('./module-path').then(m => m.ModuleName).

Copy Description experience
58
What is the purpose of Resolve guard?
Experience

The Resolve guard is used to fetch data before navigating to a route, ensuring the component has all necessary data ready when it's initialized.

Expert Explanation:

The Resolve guard is used to fetch data before navigating to a route, ensuring the component has all necessary data ready when it's initialized.

Copy Description experience
59
What is NgZone and why is it used?
Experience

NgZone is a wrapper around Zone.js that helps Angular detect asynchronous changes and trigger change detection. 'runOutsideAngular' can improve perfor...

Expert Explanation:

NgZone is a wrapper around Zone.js that helps Angular detect asynchronous changes and trigger change detection. 'runOutsideAngular' can improve performance for high-frequency events.

Copy Description experience
60
Explain Change Detection strategies.
Experience

Angular has two strategies: Default (checks everything on every event) and OnPush (only checks when Inputs change or an event occurs within the compon...

Expert Explanation:

Angular has two strategies: Default (checks everything on every event) and OnPush (only checks when Inputs change or an event occurs within the component).

Copy Description experience
61
How does OnPush strategy work?
Experience

With OnPush, Angular only runs change detection if an @Input property reference changes, an event originated in the component, or change detection is ...

Expert Explanation:

With OnPush, Angular only runs change detection if an @Input property reference changes, an event originated in the component, or change detection is manually triggered.

Copy Description experience
62
What is the purpose of ChangeDetectorRef?
Experience

It is a service used to manually trigger change detection (detectChanges), detach from the change detection tree (detach), or mark for check (markForC...

Expert Explanation:

It is a service used to manually trigger change detection (detectChanges), detach from the change detection tree (detach), or mark for check (markForCheck).

Copy Description experience
63
What is Subject in RxJS?
Experience

A Subject is both an Observable and an Observer. It allows values to be multicasted to many Observers. It acts as a bridge between non-reactive code a...

Expert Explanation:

A Subject is both an Observable and an Observer. It allows values to be multicasted to many Observers. It acts as a bridge between non-reactive code and Observers.

Copy Description experience
64
Difference between Subject and BehaviorSubject?
Experience

A Subject doesn't have an initial value and only emits future values. A BehaviorSubject requires an initial value and emits the current value to new s...

Expert Explanation:

A Subject doesn't have an initial value and only emits future values. A BehaviorSubject requires an initial value and emits the current value to new subscribers immediately.

Copy Description experience
65
What is ReplaySubject?
Experience

A ReplaySubject 'replays' a specified number of previous values to new subscribers, even if they subscribe long after the values were emitted.

Expert Explanation:

A ReplaySubject 'replays' a specified number of previous values to new subscribers, even if they subscribe long after the values were emitted.

Copy Description experience
66
Explain Content Projection.
Experience

Content projection (using <ng-content>) allows a component to insert external content into its template. It helps create reusable wrapper components (...

Expert Explanation:

Content projection (using <ng-content>) allows a component to insert external content into its template. It helps create reusable wrapper components (e.g., cards, modals).

Copy Description experience
67
What is @ViewChild and @ViewChildren?
Experience

@ViewChild is a decorator used to gain access to a child component, directive, or DOM element within its own template. @ViewChildren is for multiple r...

Expert Explanation:

@ViewChild is a decorator used to gain access to a child component, directive, or DOM element within its own template. @ViewChildren is for multiple results.

Copy Description experience
68
What is @ContentChild and @ContentChildren?
Experience

Similar to ViewChild, but used to access projected content (content inside <ng-content>) from the parent's template.

Expert Explanation:

Similar to ViewChild, but used to access projected content (content inside <ng-content>) from the parent's template.

Copy Description experience
69
What is an Angular Library?
Experience

A library is an Angular project that cannot run on its own. It is compiled into a package that can be shared across multiple Angular applications.

Expert Explanation:

A library is an Angular project that cannot run on its own. It is compiled into a package that can be shared across multiple Angular applications.

Copy Description experience
70
How to share data between components?
Experience

Parent-to-child (@Input), Child-to-parent (@Output), Sibling components (shared service with Subject/Signals), or using a State Management library (Ng...

Expert Explanation:

Parent-to-child (@Input), Child-to-parent (@Output), Sibling components (shared service with Subject/Signals), or using a State Management library (NgRx).

Copy Description experience
71
What are Dynamic Components?
Experience

Components that are instantiated at runtime rather than being declared in a template. Use ViewContainerRef and ComponentFactoryResolver (deprecated) o...

Expert Explanation:

Components that are instantiated at runtime rather than being declared in a template. Use ViewContainerRef and ComponentFactoryResolver (deprecated) or modern 'createComponent'.

Copy Description experience
72
What is the purpose of 'trackBy' in *ngFor?
Experience

trackBy is a function that returns a unique identifier for items in a list. It helps Angular optimize performance by only re-rendering items that have...

Expert Explanation:

trackBy is a function that returns a unique identifier for items in a list. It helps Angular optimize performance by only re-rendering items that have changed.

Copy Description experience
73
How to optimize Angular app bundle size?
Experience

Use Lazy Loading, AOT compilation, tree-shaking, production builds (ng build --prod), and analyze bundles using webpack-bundle-analyzer.

Expert Explanation:

Use Lazy Loading, AOT compilation, tree-shaking, production builds (ng build --prod), and analyze bundles using webpack-bundle-analyzer.

Copy Description experience
74
What is AOT vs JIT compilation?
Experience

JIT (Just-in-Time) compiles code in the browser. AOT (Ahead-of-Time) compiles code during the build process, resulting in faster rendering and smaller...

Expert Explanation:

JIT (Just-in-Time) compiles code in the browser. AOT (Ahead-of-Time) compiles code during the build process, resulting in faster rendering and smaller browser payloads.

Copy Description experience
75
What is tree-shaking?
Experience

Tree-shaking is a build-time optimization that removes unused code from the final bundle, ensuring only the necessary parts of dependencies are includ...

Expert Explanation:

Tree-shaking is a build-time optimization that removes unused code from the final bundle, ensuring only the necessary parts of dependencies are included.

Copy Description experience
76
Explain Angular Signals (New in v16).
Experience

Signals are a new reactive primitive that allows Angular to track change dependencies more granularly than Zone.js, leading to better performance and ...

Expert Explanation:

Signals are a new reactive primitive that allows Angular to track change dependencies more granularly than Zone.js, leading to better performance and simpler reactivity.

Copy Description experience
77
WritableSignal vs ComputedSignal?
Experience

WritableSignals (signal()) allow updating values via set() or update(). ComputedSignals (computed()) are read-only and derive values from other signal...

Expert Explanation:

WritableSignals (signal()) allow updating values via set() or update(). ComputedSignals (computed()) are read-only and derive values from other signals.

Copy Description experience
78
What is effect() in Signals?
Experience

effect() is a function that runs whenever the signal values it depends on change. It is typically used for side effects like logging or DOM manipulati...

Expert Explanation:

effect() is a function that runs whenever the signal values it depends on change. It is typically used for side effects like logging or DOM manipulation.

Copy Description experience
79
What are Standalone Components (v14+)?
Experience

Standalone components allow creating components, directives, and pipes without an @NgModule. They simplify application structure and enable easier laz...

Expert Explanation:

Standalone components allow creating components, directives, and pipes without an @NgModule. They simplify application structure and enable easier lazy loading.

Copy Description experience
80
How to bootstrap a Standalone Application?
Experience

Use the 'bootstrapApplication' function in main.ts, passing the root standalone component directly instead of a module.

Expert Explanation:

Use the 'bootstrapApplication' function in main.ts, passing the root standalone component directly instead of a module.

Copy Description experience
81
What is ProvideHttpClient (Standalone)?
Experience

In standalone apps, instead of HttpClientModule, you use 'provideHttpClient()' in the application config providers array.

Expert Explanation:

In standalone apps, instead of HttpClientModule, you use 'provideHttpClient()' in the application config providers array.

Copy Description experience
82
What is 'switchMap' vs 'mergeMap'?
Experience

switchMap cancels the previous inner observable and starts a new one. mergeMap handles all inner observables concurrently.

Expert Explanation:

switchMap cancels the previous inner observable and starts a new one. mergeMap handles all inner observables concurrently.

Copy Description experience
83
What is 'exhaustMap'?
Experience

exhaustMap ignores new inner observables while a current one is still running. Useful for preventing duplicate submissions (e.g., login buttons).

Expert Explanation:

exhaustMap ignores new inner observables while a current one is still running. Useful for preventing duplicate submissions (e.g., login buttons).

Copy Description experience
84
What is 'concatMap'?
Experience

concatMap queues inner observables and runs them one by one in sequence, ensuring order is preserved.

Expert Explanation:

concatMap queues inner observables and runs them one by one in sequence, ensuring order is preserved.

Copy Description experience
85
Explain Custom Validators in Reactive Forms.
Experience

A custom validator is a function that takes a FormControl and returns an error object (if invalid) or null (if valid).

Expert Explanation:

A custom validator is a function that takes a FormControl and returns an error object (if invalid) or null (if valid).

Copy Description experience
86
What is AsyncValidator?
Experience

An AsyncValidator returns a Promise or Observable that emits an error object or null. Used for server-side validation (e.g., checking if username exis...

Expert Explanation:

An AsyncValidator returns a Promise or Observable that emits an error object or null. Used for server-side validation (e.g., checking if username exists).

Copy Description experience
87
What is the purpose of 'HostListener'?
Experience

@HostListener is a decorator that allows you to listen for events on the host element of a directive or component.

Expert Explanation:

@HostListener is a decorator that allows you to listen for events on the host element of a directive or component.

Copy Description experience
88
What is 'HostBinding'?
Experience

@HostBinding allows you to set properties (like styles or classes) on the host element of a directive or component.

Expert Explanation:

@HostBinding allows you to set properties (like styles or classes) on the host element of a directive or component.

Copy Description experience
89
What is an Angular Workspace?
Experience

An Angular workspace is a directory containing one or more projects (apps or libraries) managed by the same CLI configuration.

Expert Explanation:

An Angular workspace is a directory containing one or more projects (apps or libraries) managed by the same CLI configuration.

Copy Description experience
90
How to use 'provide' in DI?
Experience

The 'provide' property allows you to map a token to a specific class (useClass), value (useValue), or factory function (useFactory).

Expert Explanation:

The 'provide' property allows you to map a token to a specific class (useClass), value (useValue), or factory function (useFactory).

Copy Description experience
91
What is InjectionToken?
Experience

An InjectionToken is used for DI when the dependency is not a class (e.g., a simple string, config object, or interface).

Expert Explanation:

An InjectionToken is used for DI when the dependency is not a class (e.g., a simple string, config object, or interface).

Copy Description experience
92
What is Multi-provider?
Experience

Setting 'multi: true' in a provider allows multiple providers to be registered for the same token, resulting in an array of instances (common for inte...

Expert Explanation:

Setting 'multi: true' in a provider allows multiple providers to be registered for the same token, resulting in an array of instances (common for interceptors).

Copy Description experience
93
Explain 'Strict Template Checking'.
Experience

A TypeScript compiler feature that ensures all types used in templates are correctly defined and checked against the component class.

Expert Explanation:

A TypeScript compiler feature that ensures all types used in templates are correctly defined and checked against the component class.

Copy Description experience
94
What is the 'Hydration' in Angular v16?
Experience

Full client-side hydration allows Angular to reuse the existing DOM rendered by Server Side Rendering (SSR) without flickering or full re-rendering.

Expert Explanation:

Full client-side hydration allows Angular to reuse the existing DOM rendered by Server Side Rendering (SSR) without flickering or full re-rendering.

Copy Description experience
95
What is SSR (Angular Universal)?
Experience

Server-Side Rendering (SSR) renders pages on the server and sends fully formed HTML to the browser, improving SEO and initial load speed.

Expert Explanation:

Server-Side Rendering (SSR) renders pages on the server and sends fully formed HTML to the browser, improving SEO and initial load speed.

Copy Description experience
96
How to handle memory leaks in Angular?
Experience

Memory leaks usually occur from unclosed subscriptions. Fix by using the async pipe, 'takeUntil', or unsubscribing in ngOnDestroy.

Expert Explanation:

Memory leaks usually occur from unclosed subscriptions. Fix by using the async pipe, 'takeUntil', or unsubscribing in ngOnDestroy.

Copy Description experience
97
What is 'takeUntil' and why use it?
Experience

takeUntil is an RxJS operator used to automatically unsubscribe from an observable when a 'notifier' observable (usually a subject triggered in ngOnDe...

Expert Explanation:

takeUntil is an RxJS operator used to automatically unsubscribe from an observable when a 'notifier' observable (usually a subject triggered in ngOnDestroy) emits.

Copy Description experience
98
What is Angular DevTools?
Experience

A browser extension for Chrome and Firefox that helps debug Angular apps by inspecting component hierarchies and change detection cycles.

Expert Explanation:

A browser extension for Chrome and Firefox that helps debug Angular apps by inspecting component hierarchies and change detection cycles.

Copy Description experience
99
Explain 'Schematics' in Angular CLI.
Experience

Schematics are template-based code generators that are part of the Angular CLI. They are used for 'ng generate' and 'ng add'.

Expert Explanation:

Schematics are template-based code generators that are part of the Angular CLI. They are used for 'ng generate' and 'ng add'.

Copy Description experience
100
What is 'ng update'?
Experience

The 'ng update' command automatically updates your workspace and dependencies to the latest version, often running migration scripts automatically.

Expert Explanation:

The 'ng update' command automatically updates your workspace and dependencies to the latest version, often running migration scripts automatically.

Copy Description experience
101
Deep Dive: How does Zone.js work?
Advanced

Zone.js 'monkey-patches' asynchronous APIs (setTimeout, addEventListener, Promise) to intercept their execution and notify Angular to run change detec...

Expert Explanation:

Zone.js 'monkey-patches' asynchronous APIs (setTimeout, addEventListener, Promise) to intercept their execution and notify Angular to run change detection.

Copy Description advanced
102
Angular Architecture: Modular vs Standalone.
Advanced

Modular uses @NgModule as a container; Standalone eliminates the module, making components the unit of organization. Standalone simplifies tree-shakin...

Expert Explanation:

Modular uses @NgModule as a container; Standalone eliminates the module, making components the unit of organization. Standalone simplifies tree-shaking and component-based routing.

Copy Description advanced
103
State Management: Why NgRx?
Advanced

NgRx provides Redux-inspired reactive state management. It solves complexity in large apps by using a single source of truth, immutable state, and cle...

Expert Explanation:

NgRx provides Redux-inspired reactive state management. It solves complexity in large apps by using a single source of truth, immutable state, and clear patterns for side effects.

Copy Description advanced
104
Explain 'Signals' vs 'RxJS' for Reactivity.
Advanced

Signals are optimized for UI-state synchronization (synchronous and glitch-free). RxJS is optimized for complex event streams and asynchronous operati...

Expert Explanation:

Signals are optimized for UI-state synchronization (synchronous and glitch-free). RxJS is optimized for complex event streams and asynchronous operations (time-based).

Copy Description advanced
105
What is 'Micro Frontends' in Angular?
Advanced

An architectural style where a large app is split into small independent apps that are integrated at runtime, often using Module Federation (Webpack).

Expert Explanation:

An architectural style where a large app is split into small independent apps that are integrated at runtime, often using Module Federation (Webpack).

Copy Description advanced
106
Module Federation: How to implement?
Advanced

By using the @angular-architects/module-federation plugin, which configures Webpack to share modules and load remote entries dynamically.

Expert Explanation:

By using the @angular-architects/module-federation plugin, which configures Webpack to share modules and load remote entries dynamically.

Copy Description advanced
107
How to implement Custom Pipes with DI?
Advanced

Pipes can inject services like any other class. Use @Injectable if you need to provide the pipe as a service, or just inject dependencies in the const...

Expert Explanation:

Pipes can inject services like any other class. Use @Injectable if you need to provide the pipe as a service, or just inject dependencies in the constructor.

Copy Description advanced
108
Performance: Preloading Strategies.
Advanced

Angular offers PreloadAllModules or custom strategies (e.g., Quicklink) to load lazy modules in the background after the initial page load.

Expert Explanation:

Angular offers PreloadAllModules or custom strategies (e.g., Quicklink) to load lazy modules in the background after the initial page load.

Copy Description advanced
109
Explain 'Deferred Loading' (@defer)?
Advanced

A v17 feature that allows declaratively loading parts of a template based on triggers like scroll, hover, or idle time, significantly improving LCP.

Expert Explanation:

A v17 feature that allows declaratively loading parts of a template based on triggers like scroll, hover, or idle time, significantly improving LCP.

Copy Description advanced
110
How to use @defer with 'on viewport'?
Advanced

Using {@defer on viewport} tells Angular only to load and render the block when it enters the browser's viewport.

Expert Explanation:

Using {@defer on viewport} tells Angular only to load and render the block when it enters the browser's viewport.

Copy Description advanced
111
What is 'Zone-less' Angular?
Advanced

With Signals, Angular can track exactly what changed, allowing apps to run without Zone.js, leading to smaller bundle sizes and predictable performanc...

Expert Explanation:

With Signals, Angular can track exactly what changed, allowing apps to run without Zone.js, leading to smaller bundle sizes and predictable performance.

Copy Description advanced
112
Security: What is DomSanitizer?
Advanced

A service to sanitize values for use in HTML, preventing XSS. It helps trust specific parts of content using 'bypassSecurityTrustHtml'.

Expert Explanation:

A service to sanitize values for use in HTML, preventing XSS. It helps trust specific parts of content using 'bypassSecurityTrustHtml'.

Copy Description advanced
113
What is Cross-Site Request Forgery (CSRF) protection in Angular?
Advanced

Angular's HttpClient provides built-in support for CSRF by reading a token from a cookie and sending it in a custom HTTP header.

Expert Explanation:

Angular's HttpClient provides built-in support for CSRF by reading a token from a cookie and sending it in a custom HTTP header.

Copy Description advanced
114
Explain 'ViewContainerRef' for Dynamic UI.
Advanced

ViewContainerRef represents a container where one or more views can be attached. It's the primary tool for custom directive logic and dynamic componen...

Expert Explanation:

ViewContainerRef represents a container where one or more views can be attached. It's the primary tool for custom directive logic and dynamic components.

Copy Description advanced
115
What is 'Renderer2' and why prefer it over direct DOM access?
Advanced

Renderer2 is an abstraction over the DOM that ensures your code works even if the app runs in a different environment (e.g., Web Worker, SSR).

Expert Explanation:

Renderer2 is an abstraction over the DOM that ensures your code works even if the app runs in a different environment (e.g., Web Worker, SSR).

Copy Description advanced
116
Web Workers in Angular: Why and How?
Advanced

CLI 'ng generate web-worker' creates a worker to run heavy CPU tasks on a separate thread, keeping the UI thread responsive.

Expert Explanation:

CLI 'ng generate web-worker' creates a worker to run heavy CPU tasks on a separate thread, keeping the UI thread responsive.

Copy Description advanced
117
Explain 'Interceptors' with Metadata.
Advanced

Interceptors can use HttpContext to pass metadata (tokens) between the request origin and the interceptor for logic branching.

Expert Explanation:

Interceptors can use HttpContext to pass metadata (tokens) between the request origin and the interceptor for logic branching.

Copy Description advanced
118
What is 'Route Reuse Strategy'?
Advanced

A class that determines if a component should be destroyed or cached and reused when a route changes (e.g., keeping search results alive).

Expert Explanation:

A class that determines if a component should be destroyed or cached and reused when a route changes (e.g., keeping search results alive).

Copy Description advanced
119
How to perform 'Manual Hydration'?
Advanced

Before v16, you used 'withServerTransition'. Now, you use 'provideClientHydration()' for the modern, non-destructive hydration.

Expert Explanation:

Before v16, you used 'withServerTransition'. Now, you use 'provideClientHydration()' for the modern, non-destructive hydration.

Copy Description advanced
120
Angular Testing: Spectator Library.
Advanced

Spectator is a popular wrapper around Angular testing that reduces boilerplate and makes tests more readable compared to standard TestBed.

Expert Explanation:

Spectator is a popular wrapper around Angular testing that reduces boilerplate and makes tests more readable compared to standard TestBed.

Copy Description advanced
121
Unit Testing: Component Harnesses.
Advanced

An Angular Material concept now available to all, allowing you to interact with components in tests via an API that mimics user behavior.

Expert Explanation:

An Angular Material concept now available to all, allowing you to interact with components in tests via an API that mimics user behavior.

Copy Description advanced
122
End-to-End Testing: Cypress vs Playwright.
Advanced

Cypress is deeply integrated but has some limitations. Playwright is faster, supports multiple tabs, and is increasingly the standard for Angular E2E.

Expert Explanation:

Cypress is deeply integrated but has some limitations. Playwright is faster, supports multiple tabs, and is increasingly the standard for Angular E2E.

Copy Description advanced
123
Explain 'InjectionContext' and 'runInInjectionContext'.
Advanced

A way to run functions that use 'inject()' outside of constructors or factory phases, useful for functional utilities.

Expert Explanation:

A way to run functions that use 'inject()' outside of constructors or factory phases, useful for functional utilities.

Copy Description advanced
124
What is 'Environment Decorator' (@Injectable({providedIn: 'root'}))?
Advanced

It allows the service to be tree-shaken if not used anywhere, optimizing the final production bundle.

Expert Explanation:

It allows the service to be tree-shaken if not used anywhere, optimizing the final production bundle.

Copy Description advanced
125
Explain 'Input Transforms' (v16.1).
Advanced

Introduced a way to transform @Input values automatically (e.g., booleanAttribute, numberAttribute) before they reach the component class.

Expert Explanation:

Introduced a way to transform @Input values automatically (e.g., booleanAttribute, numberAttribute) before they reach the component class.

Copy Description advanced
126
What is 'Self', 'SkipSelf', 'Optional', and 'Host'?
Advanced

DI resolution modifiers. 'Self' limits to current injector; 'SkipSelf' starts from parent; 'Optional' returns null if missing; 'Host' stops at host el...

Expert Explanation:

DI resolution modifiers. 'Self' limits to current injector; 'SkipSelf' starts from parent; 'Optional' returns null if missing; 'Host' stops at host element.

Copy Description advanced
127
Explain 'ForwardRef' in DI.
Advanced

A function that allows referring to a class not yet defined. Crucial for circular dependencies or recursive component configurations.

Expert Explanation:

A function that allows referring to a class not yet defined. Crucial for circular dependencies or recursive component configurations.

Copy Description advanced
128
How to handle 'Custom Elements' (Angular Elements)?
Advanced

Packaging Angular components as standard Web Components that can be used in any HTML page or framework (Vue, React).

Expert Explanation:

Packaging Angular components as standard Web Components that can be used in any HTML page or framework (Vue, React).

Copy Description advanced
129
Explain 'TemplateRef' vs 'ViewRef'.
Advanced

TemplateRef is a blueprint (defined in <ng-template>). ViewRef is the live instance of that template in the DOM.

Expert Explanation:

TemplateRef is a blueprint (defined in <ng-template>). ViewRef is the live instance of that template in the DOM.

Copy Description advanced
130
What is the 'ModuleID' in older versions?
Advanced

Used in CommonJS deployments for resolving relative URLs, now mostly obsolete in modern Webpack-based CLI builds.

Expert Explanation:

Used in CommonJS deployments for resolving relative URLs, now mostly obsolete in modern Webpack-based CLI builds.

Copy Description advanced
131
Explain 'NgPlural' Directive.
Advanced

A structural directive that allows showing different templates based on numerical value (localization support).

Expert Explanation:

A structural directive that allows showing different templates based on numerical value (localization support).

Copy Description advanced
132
Performance: 'ChangeDetectionStrategy.OnPush' deep dive.
Advanced

It works by optimizing the change detector's 'dirty' check. It relies on object immutability. If a property of an object changes but not the reference...

Expert Explanation:

It works by optimizing the change detector's 'dirty' check. It relies on object immutability. If a property of an object changes but not the reference, UI won't update.

Copy Description advanced
133
What is 'untracked' in Signals?
Advanced

A utility to read a signal's value without creating a reactive dependency in a 'computed' or 'effect' function.

Expert Explanation:

A utility to read a signal's value without creating a reactive dependency in a 'computed' or 'effect' function.

Copy Description advanced
134
Explain 'take (1)' vs 'first ()'.
Advanced

take(1) takes the first emission and completes. first() takes the first emission matching a predicate and throws an error if none match.

Expert Explanation:

take(1) takes the first emission and completes. first() takes the first emission matching a predicate and throws an error if none match.

Copy Description advanced
135
What is 'shareReplay' and its dangers?
Advanced

Saves the result of an API call to share with multiple subscribers. Danger: It can lead to memory leaks if 'refCount: true' isn't managed correctly.

Expert Explanation:

Saves the result of an API call to share with multiple subscribers. Danger: It can lead to memory leaks if 'refCount: true' isn't managed correctly.

Copy Description advanced
136
Explain 'Router Link Active' directive.
Advanced

Adds a CSS class to an element when its router link is currently active, helping with navigation highlights.

Expert Explanation:

Adds a CSS class to an element when its router link is currently active, helping with navigation highlights.

Copy Description advanced
137
What is 'Auxiliary Routes' (Named Outlets)?
Advanced

Allows having multiple side-by-side active routes by naming the router-outlets. Example: Dashboard and Chat popup simultaneously.

Expert Explanation:

Allows having multiple side-by-side active routes by naming the router-outlets. Example: Dashboard and Chat popup simultaneously.

Copy Description advanced
138
Explain 'Route Matchers'.
Advanced

Custom logic to determine if a URL matches a route, allowing for complex URL patterns that static strings can't handle.

Expert Explanation:

Custom logic to determine if a URL matches a route, allowing for complex URL patterns that static strings can't handle.

Copy Description advanced
139
Angular Security: Content Security Policy (CSP).
Advanced

Configuring headers to restrict where scripts and resources can be loaded from. Angular supports CSP by avoiding eval() and inline scripts.

Expert Explanation:

Configuring headers to restrict where scripts and resources can be loaded from. Angular supports CSP by avoiding eval() and inline scripts.

Copy Description advanced
140
Explain 'NgZone.run' vs 'NgZone.runOutsideAngular'.
Advanced

run() forces code back into the detection zone (used for 3rd party libs). runOutsideAngular() skips detection for high-freq events like 'mousemove'.

Expert Explanation:

run() forces code back into the detection zone (used for 3rd party libs). runOutsideAngular() skips detection for high-freq events like 'mousemove'.

Copy Description advanced
141
What is 'ModuleWithProviders'?
Advanced

A pattern used to return a module along with its services, usually in 'forRoot()' methods (e.g., RouterModule.forRoot()).

Expert Explanation:

A pattern used to return a module along with its services, usually in 'forRoot()' methods (e.g., RouterModule.forRoot()).

Copy Description advanced
142
Explain 'Embedded Views' vs 'Host Views'.
Advanced

Embedded Views are created from TemplateRef (<ng-template>). Host Views are created when a component is instantiated.

Expert Explanation:

Embedded Views are created from TemplateRef (<ng-template>). Host Views are created when a component is instantiated.

Copy Description advanced
143
How to handle 'Recursive Data' in templates?
Advanced

Using a component that references itself in its own template, often combined with *ngIf to stop the recursion.

Expert Explanation:

Using a component that references itself in its own template, often combined with *ngIf to stop the recursion.

Copy Description advanced
144
What is '@Attribute' decorator?
Advanced

A performance optimization that injects a static string value from the host element's attribute once, rather than tracking it via @Input.

Expert Explanation:

A performance optimization that injects a static string value from the host element's attribute once, rather than tracking it via @Input.

Copy Description advanced
145
Explain 'KeyValueDiffers' service.
Advanced

A low-level service to track changes in objects or maps, useful when writing extremely complex custom directives.

Expert Explanation:

A low-level service to track changes in objects or maps, useful when writing extremely complex custom directives.

Copy Description advanced
146
What is 'IterableDiffers'?
Advanced

Tracks changes in arrays/iterables. It's what *ngFor uses internally to know what added/removed/moved.

Expert Explanation:

Tracks changes in arrays/iterables. It's what *ngFor uses internally to know what added/removed/moved.

Copy Description advanced
147
Explain 'SecurityContext' in Sanitization.
Advanced

HTML, STYLE, SCRIPT, URL, and RESOURCE_URL are contexts that the sanitizer uses to apply different rules based on where data is injected.

Expert Explanation:

HTML, STYLE, SCRIPT, URL, and RESOURCE_URL are contexts that the sanitizer uses to apply different rules based on where data is injected.

Copy Description advanced
148
How to use 'provideAnimations'? (v15+)
Advanced

In standalone apps, use 'provideAnimations()' or 'provideNoopAnimations()' in the application providers array to enable/disable animations.

Expert Explanation:

In standalone apps, use 'provideAnimations()' or 'provideNoopAnimations()' in the application providers array to enable/disable animations.

Copy Description advanced
149
What is 'ApplicationRef'?
Advanced

Represents an instance of an Angular app on a page. Used to manually trigger tick() (full app check) or destroy the app.

Expert Explanation:

Represents an instance of an Angular app on a page. Used to manually trigger tick() (full app check) or destroy the app.

Copy Description advanced
150
Explain 'ComponentRef' instance properties.
Advanced

Allows access to the component instance (change detection), location (DOM element), and injector of a dynamically created component.

Expert Explanation:

Allows access to the component instance (change detection), location (DOM element), and injector of a dynamically created component.

Copy Description advanced
151
Implement a Writable Signal and Update it.
Beginner

Signals use .set() and .update().

Expert Explanation:

Signals use .set() and .update().

Code Example:
const count = signal(0);
count.set(5);
count.update(v => v + 1);
Copy Description programming
152
Create a Computed Signal.
Beginner

Derived state from other signals.

Expert Explanation:

Derived state from other signals.

Code Example:
const double = computed(() => count() * 2);
Copy Description programming
153
Fetch data using HttpClient and handle errors.
Experience

Use catchError from RxJS.

Expert Explanation:

Use catchError from RxJS.

Code Example:
this.http.get('/api/data').pipe(
  catchError(err => of([]))
).subscribe(res => this.data = res);
Copy Description programming
154
Implement a Reactive Form with Validation.
Beginner

FormGroup and Validators.

Expert Explanation:

FormGroup and Validators.

Code Example:
form = new FormGroup({
  email: new FormControl('', [Validators.required, Validators.email])
});
Copy Description programming
155
Implement a simple Directive for Hover Effect.
Experience

@HostListener for events.

Expert Explanation:

@HostListener for events.

Code Example:
@Directive({ selector: '[appHover]' })
export class Hover {
  @HostListener('mouseenter') onEnter() { ... }
}
Copy Description programming
156
Create a Custom Pipe to Reverse String.
Beginner

Implement PipeTransform.

Expert Explanation:

Implement PipeTransform.

Code Example:
transform(val: string): string {
  return val.split('').reverse().join('');
}
Copy Description programming
157
Use 'switchMap' for Search Logic.
Experience

Prevents race conditions.

Expert Explanation:

Prevents race conditions.

Code Example:
results$ = searchTerm$.pipe(
  switchMap(term => this.service.search(term))
);
Copy Description programming
158
Dynamic Component Injection (v13+).
Advanced

Use ViewContainerRef and createComponent.

Expert Explanation:

Use ViewContainerRef and createComponent.

Code Example:
this.vcr.createComponent(MyComponent);
Copy Description programming
159
Implement a Route Guard (Functional).
Experience

Modern Angular uses functions for guards.

Expert Explanation:

Modern Angular uses functions for guards.

Code Example:
export const authGuard: CanActivateFn = (route, state) => {
  return inject(AuthService).isLoggedIn();
};
Copy Description programming
160
Combine multiple Observables together.
Experience

forkJoin emits when all complete.

Expert Explanation:

forkJoin emits when all complete.

Code Example:
forkJoin({ a: obs1, b: obs2 }).subscribe(data => ...);
Copy Description programming
161
Implement a Debounce Search.
Beginner

Use debounceTime operator.

Expert Explanation:

Use debounceTime operator.

Code Example:
input$.pipe(debounceTime(300), distinctUntilChanged());
Copy Description programming
162
Create a Singleton Service.
Beginner

providedIn: 'root'.

Expert Explanation:

providedIn: 'root'.

Code Example:
@Injectable({ providedIn: 'root' })
Copy Description programming
163
Handle Multiple Async Pipes.
Experience

Use 'as' in *ngIf.

Expert Explanation:

Use 'as' in *ngIf.

Code Example:
<div *ngIf="data$ | async as data"> {{data.name}} </div>
Copy Description programming
164
Implement a custom form validator.
Experience

Function returning ValidatorFn.

Expert Explanation:

Function returning ValidatorFn.

Code Example:
function myVal(c: FormControl) {
  return c.value === 'bad' ? { invalid: true } : null;
}
Copy Description programming
165
Use trackBy in *ngFor.
Beginner

Optimization for lists.

Expert Explanation:

Optimization for lists.

Code Example:
trackById(idx, item) { return item.id; }
Copy Description programming
166
Navigate programmatically with Router.
Beginner

Inject Router service.

Expert Explanation:

Inject Router service.

Code Example:
this.router.navigate(['/items', id]);
Copy Description programming
167
Capture Route Parameters.
Beginner

ActivatedRoute snapshot or observable.

Expert Explanation:

ActivatedRoute snapshot or observable.

Code Example:
id = this.route.snapshot.paramMap.get('id');
Copy Description programming
168
Create a behavior subject for state shared.
Beginner

State management simple.

Expert Explanation:

State management simple.

Code Example:
user$ = new BehaviorSubject<User>(null);
Copy Description programming
169
Use 'takeUntil' for cleanup.
Experience

Standard unsubscribe pattern.

Expert Explanation:

Standard unsubscribe pattern.

Code Example:
obs$.pipe(takeUntil(this.destroy$)).subscribe();
Copy Description programming
170
Lazy load a component manually.
Advanced

Dynamic import.

Expert Explanation:

Dynamic import.

Code Example:
const { MyComp } = await import('./my.comp');
Copy Description programming
171
Implement an HTTP Interceptor.
Experience

Auth headers.

Expert Explanation:

Auth headers.

Code Example:
intercept(req, next) { const cloned = req.clone(...); return next.handle(cloned); }
Copy Description programming
172
Convert Observable to Signal.
Experience

toSignal() utility.

Expert Explanation:

toSignal() utility.

Code Example:
const data = toSignal(this.http.get(...));
Copy Description programming
173
Convert Signal to Observable.
Experience

toObservable() utility.

Expert Explanation:

toObservable() utility.

Code Example:
const val$ = toObservable(this.mySignal);
Copy Description programming
174
Implement Signal effect.
Beginner

Watch changes.

Expert Explanation:

Watch changes.

Code Example:
effect(() => console.log('Changed:', this.mySignal()));
Copy Description programming
175
Global Error Handler.
Advanced

Implement ErrorHandler class.

Expert Explanation:

Implement ErrorHandler class.

Code Example:
handleError(err) { // logs to server }
Copy Description programming
176
Input Transform (Boolean).
Experience

Auto conversion.

Expert Explanation:

Auto conversion.

Code Example:
@Input({ transform: booleanAttribute }) disabled: boolean = false;
Copy Description programming
177
Signal equality function.
Advanced

Custom comparator.

Expert Explanation:

Custom comparator.

Code Example:
count = signal(initial, { equal: (a, b) => a.id === b.id });
Copy Description programming
178
Signal 'update' with object mutate.
Experience

Note: mutate() is removed, use update().

Expert Explanation:

Note: mutate() is removed, use update().

Code Example:
state.update(s => ({...s, name: 'New'}));
Copy Description programming
179
Access @ViewChild DOM element.
Beginner

ElementRef access.

Expert Explanation:

ElementRef access.

Code Example:
@ViewChild('myDiv') div!: ElementRef;
Copy Description programming
180
NgFor object properties.
Beginner

KeyValue pipe.

Expert Explanation:

KeyValue pipe.

Code Example:
*ngFor="let item of myObj | keyvalue"
Copy Description programming
181
Sort array using pipe.
Experience

OrderBy logic.

Expert Explanation:

OrderBy logic.

Code Example:
transform(arr) { return arr.sort((a,b) => ...); }
Copy Description programming
182
Signal based form binding.
Advanced

Experimental/Custom.

Expert Explanation:

Experimental/Custom.

Code Example:
this.form.valueChanges.subscribe(v => mySignal.set(v));
Copy Description programming
183
Handle route change event.
Experience

Router events.

Expert Explanation:

Router events.

Code Example:
router.events.pipe(filter(e => e instanceof NavigationEnd))
Copy Description programming
184
Custom structural directive.
Advanced

TemplateRef/ViewContainer.

Expert Explanation:

TemplateRef/ViewContainer.

Code Example:
if (cond) { this.vcr.createEmbeddedView(this.tr); }
Copy Description programming
185
Access Host element attributes.
Experience

@Attribute injection.

Expert Explanation:

@Attribute injection.

Code Example:
constructor(@Attribute('type') type: string) {}
Copy Description programming
186
Implement infinite scroll logic.
Advanced

Intersection Observer.

Expert Explanation:

Intersection Observer.

Code Example:
obs.observe(el); ... onIntersect() { fetchNext(); }
Copy Description programming
187
Caching HTTP requests.
Experience

Map and of.

Expert Explanation:

Map and of.

Code Example:
if (cache) return of(cache); return http.get().pipe(tap(r => cache = r));
Copy Description programming
188
NgRx Action and Reducer.
Experience

State management.

Expert Explanation:

State management.

Code Example:
on(Action, (state) => ({ ...state, val: 1 }))
Copy Description programming
189
NgRx Selector.
Experience

Memoized data.

Expert Explanation:

Memoized data.

Code Example:
createSelector(feature, s => s.items)
Copy Description programming
190
Unit Test a Service.
Beginner

TestBed usage.

Expert Explanation:

TestBed usage.

Code Example:
service = TestBed.inject(MyService); expect(service).toBeTruthy();
Copy Description programming
191
Mock an HTTP call in tests.
Experience

HttpClientTestingModule.

Expert Explanation:

HttpClientTestingModule.

Code Example:
httpMock.expectOne('/api').flush(mockRes);
Copy Description programming
192
Test a component with @Input.
Beginner

Set property.

Expert Explanation:

Set property.

Code Example:
component.myInput = 'test'; fixture.detectChanges();
Copy Description programming
193
Trigger click event in unit test.
Beginner

Native element click.

Expert Explanation:

Native element click.

Code Example:
el.nativeElement.click(); fixture.detectChanges();
Copy Description programming
194
Standalone route configuration.
Experience

Route array.

Expert Explanation:

Route array.

Code Example:
providers: [provideRouter(ROUTES)]
Copy Description programming
195
Environment variable access.
Beginner

Environment file.

Expert Explanation:

Environment file.

Code Example:
import { environment } from './env';
Copy Description programming
196
Dynamic Meta Tags.
Experience

Meta service.

Expert Explanation:

Meta service.

Code Example:
this.meta.updateTag({ name: 'desc', content: '...' });
Copy Description programming
197
Update Title programmatically.
Beginner

Title service.

Expert Explanation:

Title service.

Code Example:
this.title.setTitle('New Title');
Copy Description programming
198
Signal inside a Service.
Beginner

Reactive state.

Expert Explanation:

Reactive state.

Code Example:
export class Service { count = signal(0); }
Copy Description programming
199
Recursive Route children.
Advanced

Self reference.

Expert Explanation:

Self reference.

Code Example:
path: 'dir', children: [ { path: '**', component: Dir } ]
Copy Description programming
200
Conditional polyfill loading.
Advanced

Dynamic import in main.ts.

Expert Explanation:

Dynamic import in main.ts.

Code Example:
if (!window.Intl) await import('intl');
Copy Description programming