AngularJS Interview Questions and Answers

What is AngularJS?

AngularJS is open source, JavaScript based framework which simplify the creation of single page web application.
Initially AngularJS was developed by MiskoHevery and Adam Abrons, and now it is built and maintained by Google. 

Why to use AngularJS?

1.    Easy to maintain , open source and cross browser compatible 
2.    Based on MVC (Model View Control) pattern
3.    Supports REST full services
4.    Supports two way data binding
5.    Supports form validations
6.    supports animation and Event Handling
7.    Extensible and testable
8.    Support dependency injection

Do I need jQuery for Angular?

No, Angular has its own subset of jQuery calledjQLite.
If jQuery present in the application then Angular use it. If jQuery is not located in the application script path, Angular usedjQLite.

Explain major components of AngularJS?

There are following major components of AngularJS
Module: It work as containers for components. Whereas an AngularJS application can have multiple modules.

Config: The config block represent module wise configuration settings for AngularJS application, whichapplied before application runs. 

Routes: Routes define a way between view loading and controller whereas multiple view can available on single page AngularJS application.

Views: The view is UI DOM on user browserafter rendering ofAngularJS Htmlpage.

Scope: It works between the view and controller within an AngularJS application and synchronize them.

Controller: The controller is acts as bridge between services and views, and responsible for defining methods and properties that the view can bind toand interact. 

Directive: directive extend behaviour of Html elementand allow to create custom,reusable elements that encapsulate behaviour. 

Service: Services provide functionality to an AngularJS application and extend controllers and make them more globally accessible.

What are Modules in AngularJS?

AngularJS modules work ascontainers. They logically divide an angular app into small, reusable and functional components. Each module is identified by a unique name and can be dependent on other modules. 
In AngularJS, ng is the core module and loaded by default when an angular app is started.

What are directives in AngularJS?

Directives are the AngularJS elements in Html tag that extend behaviour of Html element. All AngularJS directives start with the word "ng".
There are many built-in directives in AngularJS such as "ng-app", "ng-model", "ng-controller", "ng-repeat" etc.

What are the different types of directive in AngularJS?

In Angular, types of directives depending on their implementation on HTML tag.
So there are four types of directives-
Element directives
Attribute directives
CSS class directives
Comment directives

What is controller in AngularJS?

Controller is acting between the view and the services, whereas it is responsible for consuming data from services, processing data for display in the view, and transmitting data back to services for logic processing.
It should be lightweight and isolated from views.

What is data binding in AngularJS?

Data binding is the finest feature of theAngularJS, It is the automatic synchronization of the data between the model and view components. Whereas the view is a projection of the modelthat change withmodel changes, and vice versa.
There are two ways of data binding:
One way data binding (used in classical template)
Two way data binding (used in AngularJS template)

What are services in AngularJS?

AngularJS Services are the singleton functions or objects and used forprovide some functionality to the application. Services are prefixed with $ symbol and available globally to the entire application.

Ex.$http service is used forserver-side communication, $resource serviceused for support RESTful web services

What is scope in AngularJS?

Scope is a JavaScript object which synchronize controller with the views.
An AngularJS application has single $rootscope.The root scope has one or more child$scope objects associated with it whereas child scope inherits properties from its parent scope.

What is templateand view in AngularJS?

HTML element that contains Angular-specific attributes and directives called template in AngularJS.Whereas a view is the HTML after template has been through the AngularJS compilation process

Explain what are AngularJS routes does?

AngularJS routes enable you to create different URLs for different content in your application page without reloading the entire application. Different URLs for different content enables user to bookmark URLs to specific content. In AngularJS each such bookmarkable URL is called a route.

What are expressions in AngularJS?

Expressions are the code snippets that resolves to a value and used tobind application data to html. AngularJS expressions are placed inside {{expression}}.

What is the difference between AngularJS expressions and JavaScript expressions?

The main difference between the JavaScript expressions and Angular expressions are: 

•    TheJavaScript expressions are evaluated against the global window object, whereas in Angular the expressions are evaluatedagainst a scope object.

•    In JavaScript, undefined properties produces ReferenceError or TypeError, while In Angular expression evaluation is forgiving to undefined and null.

•    AngularJS expression doesn’t support loop, condition and exception, while java script do.

•    In AngularJS, filters can be used with expression to format data before displaying it but in JavaScript we can’t.

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.
It can be used in an expression with pipe character.
Name in lower Case: {{student.fullName() | lowercase}}

Latest Updates


By what number should we multiply -1/5 so that the product may be 9/25?

Profit and Loss

A person sells an article for Rs 550, gaining 1/10 of its cost price. Its gain percentage is.


If 3x + 2y = 12 and xy = 6, then 9x2 + 4y2 = ______.

Volume and Surface Area

In a temple there are 25 cylindrical pillars. The radius of each pillar is 28cm and height 4m. The total cost of painting the curved surface area of pillars at the rate of Rs. 8 per m2 is:

Problems on Ages

After 12 years, I shall be 3 times as old as I was 4 years ago. My present age is:

Square and Cube Root

The smallest number by which 1100 must be multiplied so that the product becomes a perfect square is____.


What is the probability that a number selected from the numbers 1, 2, 3,…….,25 is a prime number, when each of the given numbers is equally likely to be selected?

Square and Cube Root

What is the smallest number by which 3087 must be divided so that the quotient is a perfect cube?


The most comfortable distance at which one can read with a normal eye is:


Cholera is caused by:

Write the name of reptile with four chambered heart?

Compound Interest

Raj borrowed Rs. 5000 at 10% per annum on simple interest and lent the same amount at 15% per annum on compound interest. At the end of 2 years, he would ?


If the area of a square is 16 cm2, then the area of the square joining the mid-points of the sides is?

General Knowledge of MP

Vidisha is situated on the banks of river?

General Knowledge of World

When is the Human Rights Day celebrated?

Profit and Loss

By selling coconuts at the rate of Rs. 6/- each, a trader gained 20%. Find the cost of 100 coconuts?

General Knowledge of India

How many coastal state are in India?


A person is to count 4500 currency notes. Let an denote the number of notes he counts in the nth minute. If a1 = a2 = .... = a10 = 150 and a10 , a11 ,... are in an AP with common difference – 2, then the time taken by him to count all notes is ?