Viva
Viva
1. Q: What is Angular?
A: JavaScript framework for building single-page applications.
2. Q: What is the purpose of Angular?
A: To build complex web applications with ease.
1. What is Angular?
→ A front-end JavaScript framework used to build dynamic web applications.
2. What are the key features of Angular?
→ Two-way data binding, dependency injection, modular architecture, and component-based
development.
3. What is the role of TypeScript in Angular?
→ TypeScript is the primary language for Angular development, adding static typing and advanced
features.
4. What is a Single Page Application (SPA)?
→ An application that loads a single HTML page and dynamically updates the content without
refreshing.
5. What is Data Binding?
→ A technique that connects UI components with the data model.
6. What are the types of data binding in Angular?
→ One-way binding, two-way binding, property binding, and event binding.
7. What is the purpose of Directives in Angular?
→ Directives modify DOM elements and behavior (ngFor, ngIf, etc.).
8. What is an Angular Component?
→ A class that controls a part of the UI and contains HTML, CSS, and logic.
9. What is the purpose of @Component in Angular?
→ It is a decorator that defines metadata for an Angular component.
10. What is the difference between AngularJS and Angular?
→ AngularJS is JavaScript-based (version 1.x), while Angular (2+) uses TypeScript and has better
performance.
Unit 7: Directives
13. Q: What is a directive in Angular?
A: Custom attribute or element, adds functionality to HTML.
Additional Questions
29. Q: What is the difference between "var", "let", and "const" in TypeScript?
A: "var" is function-scoped, "let" and "const" are block-scoped.
Development Environment:
6. How do you set up an AngularJS environment?
Install Node.js, Angular CLI, and create a project using ng new command.
7. What is the role of the Angular CLI?
CLI simplifies Angular project creation, building, testing, and deployment with built-in
commands.
TypeScript Fundamentals:
8. What is TypeScript?
TypeScript is a statically typed superset of JavaScript that compiles to JavaScript, enhancing
productivity and maintainability.
9. What are TypeScript's advantages over JavaScript?
TypeScript offers static typing, interfaces, classes, enhanced tooling, and error checking.
10. What are TypeScript’s primitive types?
Types include number, string, boolean, null, undefined, void, and any.
Miscellaneous:
20. What is RxJS in Angular?
RxJS is a library for reactive programming, managing asynchronous data streams with
observables.