Angular JS Interview Questions and Answers
Tags: angular, webdev, beginners, programming
Published: 2024-07-11 10:46:13


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f43cy2ijjy9h9vefdx5r.png)

**1. What is AngularJS?**
AngularJS is a structural framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly.

**2. What are the key features of AngularJS?**
Some of the key features of AngularJS include:

- Data Binding: AngularJS supports data binding, which allows you to synchronize data between the model and the view.
- Dependency Injection: AngularJS has a built-in dependency injection subsystem that helps you write components that are loosely coupled.
- Directives: AngularJS has the concept of directives, which are markers on DOM elements that tell AngularJS to attach a specified behavior to that DOM element.
- Templating: AngularJS uses HTML as the template language, which allows you to create your own HTML tags.
- Routing: AngularJS has a built-in routing framework that allows you to deep link your application.

**3. What is a module in AngularJS?**
In AngularJS, a module is a collection of services, directives, filters, and configuration information. Modules are the main building blocks of an AngularJS application.

**4. What is a scope in AngularJS?**
In AngularJS, a scope is a JavaScript object that refers to the application model. It acts as a glue between the controller and the view. Scopes can watch expressions and propagate events.

**5. What is a controller in AngularJS?**
In AngularJS, a controller is a JavaScript function that is responsible for providing the data and behavior to the HTML template. Controllers are used to control the flow of data in an AngularJS application.

**6. What is a directive in AngularJS?**
In AngularJS, a directive is a marker on a DOM element that tells AngularJS to attach a specified behavior to that DOM element. Directives are used to create custom HTML tags, attributes, classes, and comments.

**7. What is a service in AngularJS?**
In AngularJS, a service is a function or an object that is used to encapsulate some business logic or utility functions. Services are used to share data and functionality across different parts of an AngularJS application.

**8. What is a filter in AngularJS?**
In AngularJS, a filter is a function that takes an input, processes it, and returns the transformed output. Filters are used to format data for display.

**9. What is two-way data binding in AngularJS?**
In AngularJS, two-way data binding is a feature that automatically synchronizes the model data with the view data, and vice versa. This means that any changes made to the model data are immediately reflected in the view, and any changes made to the view data are immediately reflected in the model.

**10. What is the difference between $scope and $rootScope in AngularJS?**
In AngularJS, $scope is a local scope object that is associated with a specific controller or directive. $rootScope is the top-level scope object that is available to all controllers and directives in an AngularJS application.

Looking to learn Angular JS? Check out our [Angular JS Online Training](https://nareshit.com/courses/angular-online-training) to get started.