AngularJS Interview Questions and Answers

1) What is AngularJS?

AngularJS is a JavaScript framework i.e. used to create single web page application. It follows MVC (Model View Controller) pattern. It is open source, cross browser compliant and easy to maintain.

2) What are the advantages of AngularJS?

  • allows us to create single page application
  • follows MVC pattern
  • predefined form validations
  • supports animation
  • open source
  • cross browser compliant
  • supports two way data binding
  • its code are unit testable

3) What are the disadvantages of AngularJS?

  • JavaScript Dependent: If end user disables JavaScript, AngularJS will not work.
  • Not Secured: It is JavaScript based framework so it is not safe to authenticate user through AngularJS only.

4) Is AngularJS dependent on JQuery?


5) What IDE’s are currently used for the development of AngularJS?

  • Eclipse
  • Visual Studio
  • WebStorm
  • TextMate etc.

6) What are the features of AngularJS?

  1. MVC
  2. Validations
  3. Modules
  4. Directives
  5. Templates
  6. Scope
  7. Expressions
  8. Data Binding
  9. Filters
  10. Services
  11. Routing
  12. Dependency Injection
  13. Testing

7) What are directives in AngularJS?

Directives are the markers on DOM element that is used to specify behavior on that DOM element. All AngularJS directives start with the word “ng”. There are many in-built directives in AngularJS such as “ng-app”, “ng-model”, “ng-controller”, “ng-repeat” etc.

Let’s see a simple example of AngularJS directive.

  1. <input type=“text” id=“empName”  ng-model=“EmpName”/>  

8) What are controllers in AngularJS?

Controllers are JavaScript functions that are used to provide data and logic to HTML UI. It acts as an interface between Server and HTML UI.

9) What are the usage of controllers in AngularJS?

AngularJS Controllers are used to:

  • Set up initial state of the $scope object, and
  • Add behavior to the $scope object.

10) What is data binding in AngularJS?

Data Binding is the automatic synchronization of data between model and view. There are two ways of data binding:

  • One way data binding (used in classical template)
  • Two way data binding (used in AngularJS template)

11) What are services in AngularJS?

Services are objects that can be used to store and share data across the application. AngularJS offers many built-in services such as $http i.e. used to make XMLHttpRequest.

12) What is scope in AngularJS?

Scope is an object that represents application model.

Each AngularJS application can have only one root scope but can have multiple child scopes.

13) What is template in AngularJS?

A template consists of HTML, CSS and AngularJS directives that are used to render dynamic view.

14) What are expressions in AngularJS?

Expressions are the code snippets that resolves to a value. AngularJS expressions are placed inside {{expression}}. For example:

  1. {{1+1}}  

AngularJS supports one-time binding expressions.

15) What is the use of filter in AngularJS?

A filter is used to format the value of expression to display the formatted output. AngularJS enables us to write our own filter.

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:

Comments and Discussions

Your email address will not be published. Required fields are marked *