Basic Angular Interview Questions & Answers
1. What is Angular?
Angular is a TypeScript-based front-end framework used to build Single Page Applications (SPA).
2. What is a Component in Angular?
A component is the basic building block of Angular. It contains HTML (template), CSS (styles), and
TypeScript (logic).
3. What is a Module?
A module groups related components, directives, pipes, and services. The main module is
AppModule.
4. What is Data Binding?
Data binding connects HTML and TypeScript. Types: Interpolation, Property Binding, Event
Binding, and Two-way Binding.
5. What is a Directive?
Directives modify the structure or behavior of DOM elements. Types: Structural (*ngIf, *ngFor) and
Attribute (ngClass, ngStyle).
6. What is Dependency Injection?
Dependency Injection allows a class to receive dependencies from external sources rather than
creating them itself.
7. What is a Service in Angular?
A service is used to share data, call APIs, and handle business logic.
8. What is Routing?
Routing allows navigation between different components/pages without reloading the entire
application.
9. What are Lifecycle Hooks?
Lifecycle hooks are special methods like ngOnInit(), ngOnChanges(), and ngOnDestroy() used
during a component’s lifecycle.
10. What is an Observable?
Observable is used to handle asynchronous operations like HTTP requests. Angular uses RxJS for
Observables.