Angular Interview Questions: Basics

Angular 14 min min read Updated: Nov 16, 2026 Beginner
Angular Interview Questions: Basics
Beginner Topic 1 of 3

Core Concepts

Q1. What is Angular?

A TypeScript-based framework from Google for building single-page web apps. It gives you components, routing, forms, HTTP, dependency injection and a CLI in one package.

Q2. Angular vs AngularJS?

AngularJS (1.x) used JavaScript and controllers. Angular (2+) is a full rewrite using TypeScript and components. They are different frameworks.

Q3. What is a component?

A class with the @Component decorator that controls a part of the screen. It has a selector, a template (HTML), styles and logic.

Q4. What are standalone components?

Components that do not need an NgModule. They list their own dependencies in an imports array. Standalone is the default since Angular 19, and new apps do not need NgModules.

Q5. What is an NgModule?

The older way of grouping components, pipes and directives. It still exists in older projects but is no longer needed in new ones.

Templates and Binding

Q6. Types of data binding?

TypeSyntaxDirection
Interpolation{{ value }}Class to view
Property binding[src]="url"Class to view
Event binding(click)="save()"View to class
Two-way binding[(ngModel)]="name"Both

Q7. Interpolation vs property binding?

Interpolation turns a value into text. Property binding sets a DOM property and keeps the value type (booleans, objects).

Q8. What is the new control flow?

Built-in template blocks @if, @for (with required track), @switch and @defer. They replace *ngIf, *ngFor and *ngSwitch, are faster and need no imports.

**Q9. Why do we need track in @for?**

It tells Angular how to identify each item so it can reuse DOM elements when the list changes, which improves performance.

Q10. What are pipes?

Functions used in templates to transform values, such as date, currency, uppercase and async. You can write custom pipes with @Pipe.

Q11. What are directives and their types?

  • Component directives: components with a template
  • Structural: change the DOM structure (*ngIf, *ngFor, or the new @if)
  • Attribute: change appearance or behavior (ngClass, ngStyle, custom directives)

Signals

Q12. What is a signal?

A reactive value wrapper. You read it by calling it (count()), change it with set or update, and Angular updates only the parts of the screen that use it.

typescript count = signal(0); double = computed(() => this.count() * 2); increment() { this.count.update(c => c + 1); }

**Q13. signal vs computed vs effect?**

  • signal: writable state
  • computed: read-only value derived from other signals, cached
  • effect: runs side effects (logging, saving) when signals change

Q14. How do components talk to each other?

  • Parent to child: input()
  • Child to parent: output()
  • Two-way: model()
  • Unrelated components: a shared service with signals

Services, DI and Routing

Q15. What is dependency injection?

A pattern where Angular creates objects (services) and gives them to the classes that need them, instead of the class creating them. It makes code reusable and testable.

typescript @Injectable({ providedIn: 'root' }) export class UserService {} export class Profile { private users = inject(UserService); }

**Q16. What does providedIn: 'root' mean?**

The service is a single shared instance for the whole app and can be removed from the bundle if nobody uses it (tree-shakable).

**Q17. What is routing and <router-outlet>?**

Routing maps URLs to components. <router-outlet> is the place where the matched component is shown.

**Q18. routerLink vs href?**

routerLink navigates inside the app without reloading the page. href makes a full page load.

Q19. What is lazy loading?

Loading code for a route only when the user visits it, using loadComponent or loadChildren. It makes the first load faster.

Forms and HTTP

Q20. Template-driven vs reactive forms?

Template-driven forms are defined in HTML with ngModel and suit small forms. Reactive forms are defined in TypeScript with FormGroup and FormControl, are easier to test and suit complex forms.

Q21. How do you call an API?

Register provideHttpClient(), inject HttpClient in a service and call get, post, put or delete. These return Observables that you subscribe to or convert with toSignal.

Q22. What is an Observable?

A stream of values over time from RxJS. It does nothing until you subscribe. HTTP calls, events and timers can all be Observables.

Tools

Q23. What is the Angular CLI?

A command-line tool: ng new, ng serve, ng generate, ng build, ng test, ng update.

**Q24. What are package.json, angular.json and tsconfig.json?**

  • package.json: dependencies and scripts
  • angular.json: build and serve settings
  • tsconfig.json: TypeScript compiler options

Q25. What is AOT compilation?

Ahead-of-Time compilation turns templates into JavaScript at build time. The app starts faster and errors are found earlier. It is the default.

How to answer: Give a short definition, a one-line example and a real use case. Interviewers like clear, simple answers.

Conclusion

Know components, standalone, binding, control flow, signals, services with DI, routing, forms and HTTP. Practice explaining each in two or three simple sentences.

Quick Summary: Be ready to define and give a tiny code example for each core concept.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators