Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
Short answer: What are pipeline templates and how are they used? Answer: Templates let you reuse pipeline steps across projects — great for standardization. Example code You can create a reusable file: 📄 .azure-pipeline…
Short answer: "ApplicationInsights": { "ConnectionString": "InstrumentationKey=xxxx-xxxx-xxxx" } Real-world example (ShopNest) Azure DevOps holds ShopNest repos, boards, and release pipeline…
Short answer: Restore packages as usual:? is a common interview topic in Azure DevOps. Give a clear definition, then one concrete example. Real-world example (ShopNest) Azure DevOps holds ShopNest repos, boards, and rele…
Short answer: dd SonarQube tasks to your build pipeline: task: SonarQubePrepare@5 inputs: SonarQube: 'MySonarServiceConnection' scannerMode: 'MSBuild' projectKey: 'MyProject' projectName: 'MyApp' script: dotnet build tas…
Short answer: <<<<<<< HEAD old code ======= new code >>>>>>> feature/login Real-world example (ShopNest) Azure DevOps holds ShopNest repos, boards, and release pipelines in one p…
Short answer: Use async/await with Angular's waitForAsync or Jasmine’s done callback. Use Angular’s fakeAsync and tick() to simulate asynchronous passage of time. Example with fakeAsync: it('should fetch data asynchronou…
Short answer: Lazy loading delays loading feature modules until the user navigates to their route. Implemented with the router using loadChildren and dynamic imports. Example code const routes: Routes = [ { path: 'admin'…
Short answer: ngular? Create a validator function returning an error object or null. ✅ Example (Custom validator checking forbidden name): function forbiddenNameValidator(nameRe: RegExp): ValidatorFn { return (control: A…
Short answer: decorators. Decorators are functions that add metadata to classes, methods, or properties. Common Angular Decorators: Decorator Description @Componen Declares a component @NgModule Declares a module @Inject…
Short answer: Use Async Validators returning Observable<ValidationErrors | null>. ✅ Example code function uniqueUsernameValidator(service: UserService): AsyncValidatorFn { return (control: AbstractControl): Observa…
Short answer: Pipes transform data in templates. Used with the pipe | operator. Angular provides built-in pipes like date, currency, uppercase, async, etc. Example code <p>{{ birthday | date:'longDate' }}</p>…
Short answer: Use HttpClientTestingModule and HttpTestingController to mock and control HTTP requests. Example code beforeEach(() => { TestBed.configureTestingModule({ imports: [HttpClientTestingModule] }); httpTestin…
Short answer: Angular CLI supports custom builders to extend build behavior. Create a Node.js package implementing the Builder interface. Define builder options and logic in a builders.json. Use the custom builder in ang…
Short answer: synchronously in Angular? Use Async Validators returning Observable<ValidationErrors | null>. ✅ function uniqueUsernameValidator(service: UserService): syncValidatorFn { return (control: AbstractContr…
Short answer: Implement a global error handler by extending Angular’s ErrorHandler class: @Injectable() export class GlobalErrorHandler implements ErrorHandler { handleError(error: any) { // log to server or show user no…
Short answer: pplication? Implement a global error handler by extending Angular’s ErrorHandler class: @Injectable() export class GlobalErrorHandler implements ErrorHandler { handleError(error: any) { // log to server or…
Short answer: Create a class with the @Pipe decorator implementing PipeTransform. Implement a transform() method with your logic. Example: @Pipe({ name: 'exclaim' }) export class ExclaimPipe implements PipeTransform { tr…
Short answer: AOT compiles templates before runtime, improving startup performance. Enable via: ng build --aot Usually enabled automatically with --prod. Can be configured in angular.json: "configurations": { &…
Short answer: Angular uses the fileReplacements option in angular.json. Explain a bit more You create environment files like environment.ts and environment.prod.ts. During build, Angular replaces the environment file bas…
Short answer: Angular modules (NgModules) are containers that group related components, directives, pipes, and services. Purpose: Organize code Enable lazy loading Manage dependencies Example code @NgModule({ declaration…
Short answer: Use the reset() method on FormGroup or NgForm. Explain a bit more ✅ Examples: this.profileForm.reset(); myForm.resetForm(); You can also pass default values: this.profileForm.reset({ firstName: 'John', last…
Short answer: Protractor is built on WebDriverJS for Angular E2E tests. Write test specs using Jasmine syntax. Run tests against a running Angular app. Example test: describe('App E2E Test', () => { it('should display…
Short answer: Test form validity by setting control values and checking validity state. Example code it('should mark form invalid when empty', () => { component.form.controls['email'].setValue(''); expect(component.fo…
Short answer: Offload heavy computations or tasks to: Web Workers to run in background threads. ngZone.runOutsideAngular() to prevent triggering change detection unnecessarily. Use RxJS operators like debounce, throttle…
Short answer: ngular? Test form validity by setting control values and checking validity state. it('should mark form invalid when empty', () => { component.form.controls['email'].setValue(''); expect(component.form.va…
Azure DevOps Microsoft Azure Tutorial · DevOps
Short answer: What are pipeline templates and how are they used? Answer: Templates let you reuse pipeline steps across projects — great for standardization.
You can create a reusable file: 📄 .azure-pipelines/build-template.yml steps: script: dotnet restore script: dotnet build Then in your main pipeline: extends: template: .azure-pipelines/build-template.yml This keeps your YAML DRY (Don’t Repeat Yourself) and consistent.
ShopNest’s YAML pipeline builds on every PR, runs unit tests, then deploys to a staging slot on main-branch merges.
Azure DevOps Microsoft Azure Tutorial · DevOps
Short answer: "ApplicationInsights": { "ConnectionString": "InstrumentationKey=xxxx-xxxx-xxxx" }
Azure DevOps holds ShopNest repos, boards, and release pipelines in one place so build + deploy stay repeatable.
Azure DevOps Microsoft Azure Tutorial · DevOps
Short answer: Restore packages as usual:? is a common interview topic in Azure DevOps. Give a clear definition, then one concrete example.
Azure DevOps holds ShopNest repos, boards, and release pipelines in one place so build + deploy stay repeatable.
Azure DevOps Microsoft Azure Tutorial · DevOps
Short answer: dd SonarQube tasks to your build pipeline: task: SonarQubePrepare@5 inputs: SonarQube: 'MySonarServiceConnection' scannerMode: 'MSBuild' projectKey: 'MyProject' projectName: 'MyApp' script: dotnet build task: SonarQubeAnalyze@5 task: SonarQubePublish@5 inputs: pollingTimeoutSec: '300'
Azure DevOps holds ShopNest repos, boards, and release pipelines in one place so build + deploy stay repeatable.
Azure DevOps Microsoft Azure Tutorial · DevOps
Short answer: <<<<<<< HEAD old code ======= new code >>>>>>> feature/login
Azure DevOps holds ShopNest repos, boards, and release pipelines in one place so build + deploy stay repeatable.
Angular Angular Tutorial · Angular
Short answer: Use async/await with Angular's waitForAsync or Jasmine’s done callback. Use Angular’s fakeAsync and tick() to simulate asynchronous passage of time. Example with fakeAsync: it('should fetch data asynchronously', fakeAsync(() => { let data; service.getData().subscribe(result => data = result); tick(); // simulate async time passing expect(data).toEqual(['expected data']); }));
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: Lazy loading delays loading feature modules until the user navigates to their route. Implemented with the router using loadChildren and dynamic imports.
const routes: Routes = [ { path: 'admin', loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule) } ]; This reduces initial bundle size and improves app startup time.
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: ngular? Create a validator function returning an error object or null. ✅ Example (Custom validator checking forbidden name): function forbiddenNameValidator(nameRe: RegExp): ValidatorFn { return (control: AbstractControl): ValidationErrors | null => { const forbidden = nameRe.test(control.value); return forbidden ? { forbiddenName: { value:… control.value…… }… ngular? ngular? Create a validator function returning an…
error object or null. ✅ Example (Custom validator checking forbidden name): function forbiddenNameValidator(nameRe: RegExp): ValidatorFn { return (control: AbstractControl): ValidationErrors | null => { const forbidden = nameRe.test(control.value); return forbidden ? { forbiddenName: { value: control.value }… ngular? Create a validator function returning an error object or null. ✅ Example (Custom validator checking forbidden name): function forbiddenNameValidator(nameRe: RegExp): ValidatorFn { return (control: AbstractControl): ValidationErrors | null => { const forbidden = nameRe.test(control.value); return forbidden ? {… ngular?… const forbidden = nameRe.test(control.value);
return forbidden ? { forbiddenName: { value: control.value } } : null; }; } // Usage: new FormControl('', [forbiddenNameValidator(/admin/i)])
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: decorators. Decorators are functions that add metadata to classes, methods, or properties. Common Angular Decorators: Decorator Description @Componen Declares a component @NgModule Declares a module @Injectab le Declares a service for DI @Input() Pass data from parent to child @Output() Emit events from child to parent @Directiv Create custom… directives…… @Component({ selector: 'app-header', templateUrl:…
Use @Input() in a product card to pass product details from a parent ProductListComponent.
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: Use Async Validators returning Observable<ValidationErrors | null>. ✅
function uniqueUsernameValidator(service: UserService): AsyncValidatorFn { return (control: AbstractControl): Observable<ValidationErrors | null> => { return service.checkUsername(control.value).pipe( map(isTaken => (isTaken ? { uniqueUsername: true } : null)) ); }; } // Usage: new FormControl('', null, uniqueUsernameValidator(this.userService));
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: Pipes transform data in templates. Used with the pipe | operator. Angular provides built-in pipes like date, currency, uppercase, async, etc.
<p>{{ birthday | date:'longDate' }}</p>
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: Use HttpClientTestingModule and HttpTestingController to mock and control HTTP requests.
beforeEach(() => { TestBed.configureTestingModule({ imports: [HttpClientTestingModule] }); httpTestingController = TestBed.inject(HttpTestingController); }); it('should call GET API', () => { service.getData().subscribe(data => { expect(data).toEqual(mockData); }); const req = httpTestingController.expectOne('api/data'); expect(req.request.method).toBe('GET'); req.flush(mockData); httpTestingController.verify(); });
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: Angular CLI supports custom builders to extend build behavior. Create a Node.js package implementing the Builder interface. Define builder options and logic in a builders.json. Use the custom builder in angular.json for build or serve targets. Use case: Customized builds, code analysis, or special deployment pipelines.
Angular Angular Tutorial · Angular
Short answer: synchronously in Angular? Use Async Validators returning Observable<ValidationErrors | null>. ✅ function uniqueUsernameValidator(service: UserService): syncValidatorFn { return (control: AbstractControl): Observable<ValidationErrors | null> => { return service.checkUsername(control.value).pipe( map(isTaken => (isTaken ? {… uniqueUsername: true } :…… null)) ); }; } // Usage: new FormControl('', null,…
uniqueUsernameValidator(this.userService)); synchronously in Angular? synchronously in Angular? Use Async Validators returning Observable<ValidationErrors | null>. ✅
function uniqueUsernameValidator(service: UserService): syncValidatorFn { return (control: AbstractControl): Observable<ValidationErrors | null> => { return service.checkUsername(control.value).pipe( map(isTaken => (isTaken ? {… uniqueUsername: true } :… null)) ); }; } // Usage: new FormControl('', null, uniqueUsernameValidator(this.userService)); synchronously in Angular? synchronously in Angular? Use Async Validators returning Observable<ValidationErrors | null>. ✅ Example: function uniqueUsernameValidator(service: UserService): syncValidatorFn { return (control: AbstractControl): Observable<ValidationErrors | null> => { return service.checkUsername(control.value).pipe( map(isTaken => (isTaken ? { uniqueUsername: true } :… null)) ); }; } // Usage: new FormControl('', null, uniqueUsernameValidator(this.userService)); synchronously in Angular? Use Async Validators returning Observable<ValidationErrors | null>. ✅ Example: function uniqueUsernameValidator(service: UserService): syncValidatorFn { return (control: AbstractControl): Observable<ValidationErrors | null> => { return service.checkUsername(control.value).pipe( map(isTaken => (isTaken ? { uniqueUsername: true } : null)) ); }; } // Usage: new FormControl('', null, uniqueUsernameValidator(this.userService));
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: Implement a global error handler by extending Angular’s ErrorHandler class: @Injectable() export class GlobalErrorHandler implements ErrorHandler { handleError(error: any) { // log to server or show user notification console.error('Global error:', error); } } Provide it in your AppModule: providers: [{ provide: ErrorHandler, useClass: GlobalErrorHandler }] Can also use HTTP interceptors to catch API errors.
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: pplication? Implement a global error handler by extending Angular’s ErrorHandler class: @Injectable() export class GlobalErrorHandler implements ErrorHandler { handleError(error: any) { // log to server or show user notification console.error('Global error:', error); } } Provide it in your AppModule: providers: [{ provide: ErrorHandler,… useClass:……… pplication? pplication? Implement a global error handler by…
extending Angular’s ErrorHandler class: @Injectable() export class GlobalErrorHandler implements ErrorHandler { handleError(error: any) { // log to server or show user notification console.error('Global error:', error); } } Provide it in your AppModule: providers: [{ provide: ErrorHandler, useClass:… pplication? Implement a global error handler by extending Angular’s ErrorHandler class: @Injectable() export class GlobalErrorHandler implements ErrorHandler { handleError(error: any) { // log to server or show user notification console.error('Global error:', error); } } Provide it in your AppModule: providers: [{ provide:… pplication?…
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: Create a class with the @Pipe decorator implementing PipeTransform. Implement a transform() method with your logic. Example: @Pipe({ name: 'exclaim' }) export class ExclaimPipe implements PipeTransform { transform(value: string): string { return value + '!!!';
}
} Use in template: <p>{{ 'Hello' | exclaim }}</p> <!-- Outputs: Hello!!! -->
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: AOT compiles templates before runtime, improving startup performance. Enable via: ng build --aot Usually enabled automatically with --prod. Can be configured in angular.json: "configurations": { "production": { "aot": true }
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: Angular uses the fileReplacements option in angular.json.
You create environment files like environment.ts and environment.prod.ts. During build, Angular replaces the environment file based on the target configuration. Example in angular.json: "configurations": { "production": { "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" } } } Allows different API endpoints, debug flags, or configurations per environment. Best Practices
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: Angular modules (NgModules) are containers that group related components, directives, pipes, and services. Purpose: Organize code Enable lazy loading Manage dependencies
@NgModule({ declarations: [LoginComponent], imports: [CommonModule, FormsModule], exports: [LoginComponent] }) export class AuthModule {} Real-Time Example: AuthModule for login and registration AdminModule for dashboard, user management
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: Use the reset() method on FormGroup or NgForm.
✅ Examples: this.profileForm.reset(); myForm.resetForm(); You can also pass default values: this.profileForm.reset({ firstName: 'John', lastName: '' }); Summary Table: Concept Template-Driven Reactive Setup Use FormsModule, ngModel Use ReactiveFormsModule, FormGroup Validation Template-driven (HTML attrs) Programmatic with Validators Form Definition Implicit Explicit in TypeScript Custom Validation Limited Full control via functions Async Validation Not supported Supported with AsyncValidators Testing Harder Easier and more robust FormBuilder N/A Simplifies form creation Change Detection & Performance Optimization
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: Protractor is built on WebDriverJS for Angular E2E tests. Write test specs using Jasmine syntax. Run tests against a running Angular app. Example test: describe('App E2E Test', () => { it('should display welcome message', () => { browser.get('/'); expect(element(by.css('h1')).getText()).toEqual('Welcome'); }); }); Run with: ng e2e
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: Test form validity by setting control values and checking validity state.
it('should mark form invalid when empty', () => { component.form.controls['email'].setValue(''); expect(component.form.valid).toBeFalse(); }); it('should mark form valid with correct email', () => { component.form.controls['email'].setValue('test@example.com'); expect(component.form.valid).toBeTrue(); }); Advanced Angular Topics
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: Offload heavy computations or tasks to: Web Workers to run in background threads. ngZone.runOutsideAngular() to prevent triggering change detection unnecessarily. Use RxJS operators like debounce, throttle to optimize async streams. Break large tasks into smaller chunks. Miscellaneous Angular Concepts
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.
Angular Angular Tutorial · Angular
Short answer: ngular? Test form validity by setting control values and checking validity state. it('should mark form invalid when empty', () => { component.form.controls['email'].setValue(''); expect(component.form.valid).toBeFalse(); }); it('should mark form valid with correct email', () => {… component.form.controls['email'].setValue('test@example.com');…… expect(component.form.valid).toBeTrue(); }); dvanced Angular Topics…
ngular? ngular? Test form validity by setting control values and checking validity state.
it('should mark form invalid when empty', () => { component.form.controls['email'].setValue(''); expect(component.form.valid).toBeFalse(); }); it('should mark form valid with correct email', () => {… component.form.controls['email'].setValue('test@example.com');… expect(component.form.valid).toBeTrue(); }); dvanced Angular Topics ngular? ngular? Test form validity by setting control values and checking validity state. Example: it('should mark form invalid when empty', () => { component.form.controls['email'].setValue(''); expect(component.form.valid).toBeFalse(); }); it('should mark form valid with correct email', () => { component.form.controls['email'].setValue('test@example.com');… expect(component.form.valid).toBeTrue(); }); dvanced Angular Topics ngular? Test form validity by setting control values and checking validity state. Example: it('should mark form invalid when empty', () => { component.form.controls['email'].setValue(''); expect(component.form.valid).toBeFalse(); }); it('should mark form valid with correct email', () => { component.form.controls['email'].setValue('test@example.com'); expect(component.form.valid).toBeTrue(); }); dvanced Angular Topics
ShopNest admin can be built in Angular with modules/components, services for API calls, and reactive forms for product edit.