Top AngularJS Questions and Answers

    1 Votes

Top 60+ frequently asked AngularJS interview questions and answers for freshers and 2-5 year experienced web developers.

1) What is AngularJS?

AngularJS is developed by Google and it is an open source framework and it is used to create one page web apps or single page application using JavaScript, HTML and CSS.

2) What are the uses of AngularJS?
Below are the uses of AngularJS –
  • It uses MVC pattern.
  • Allows to create our own directive for making components reusable. 
  • Used for two way binding i.e, connecting model and view.
  • Supports Dependency Injection (DI)
3) Explain the features of AngularJS?
Below are the list of AngularJS features –
  • Model
  • View
  • Controller
  • Scope
  • Data Binding
  • Services
  • Filters
  • Directives
  • Testable
4) Explain scope in AngularJS?

Scope will act like a glue between view and controller and scopes are arranged in hierarchical structure.

5) Why the AngularJS project called “AngularJS”?

The reason is HTML will have angle bracket “<”, “>” and “ng” is sound like “Angular”. So it is being called as AngularJS.

6) List out the advantages of AngularJS?

Below are the list of advantages of AngularJS –

  • Code Reusability
  • Data Binding
  • Testing
  • Support
  • Customize and Extensible

7) What are AngularJS Expressions?

Angular Expressions are code snippets and this usually be placed in “{{ }}”. This will be like - {{ expression }}.

8) List out the differences between java Script and angular JS expressions?

Below are the list of differences between java script and angular JS

  • In Javascript expressions are being evaluated from the global window whereas in angularJS it is being evaluated from scope object.
  • Conditions, Loops and Exceptions are not supported in AngularJS as in Javascript.

9) Explain controller in AngularJS?

Controller is constructor function in AngularJS. Controller can be attached to DOM using “ng-controller” attribute.

10) Which and all browsers support AngularJS?

All major browsers like – Chrome, Safari, Firefox, Opera 15+, IE 9+ will support AngularJS.

11) How AngularJS is used to handle the security hurdles?

Below are the list of security hurdles handled by AngularJS –

  • Used for preventing CSS attacks
  • Used for preventing XSRF protection
  • Used for preventing HTML injection

12) Explain module in AngularJS?

Modules are like namespaces in C#. Modules are used for dividing single page angular app to functional, reusable and small components and can be integrated with another angular app. Module can be assigned using “ng-app” directive.

13) How we can use JQuery with AngularJS?

AngularJS uses JQLite, which is a part or subset of JQuery library. If JQuery to be used then load the JQuery library before loading the AngularJS library.

14) Explain how we can create module and using it in AngularJS?

Below is the code snippet for creating and using module in AngularJS –

Creating a module -

<script type="text/javascript"> 
angular.module('myFirstApp', []);
angular.module('myFirstApp', ['MydependentModule1', 'MydependentModule2']);

Using the Module –

<html ng-app="'myFirstApp'"> 
<head> ... </head>
<body> ... </body>

15) Explain directive in AngularJS?

Directive are combination of javascript code and AngularJS markup. Javascript directive code defines the behaviors and template data of HTML elements. There are some built in directives like – “ng-controller”,”ng-app”, “ng-repeat” etc.

Page 1 of 5

Popular Videos


How to improve your Interview, Salary Negotiation, Communication & Presentation Skills.

Got a tip or Question?
Let us know

Related Articles

HTML/HTML5 Interview Questions and Answers
JQuery Interview Questions and Answers
Javascript Interview Questions and Answers
Top 60+ Node.JS Interview Questions and answers
Top 70 CSS Interview Questions and Answers
React JS Interview Questions and Answers