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

Latest Updates

Height and Distance

An aeroplane flying at a height of 300 m above the ground passes vertically above another plane at an instant when the angles of elevation of the two planes from the same point on the ground are 60º and 45º respectively. What is the height of the lower plane from the ground?

From the top of a building 90 m high, the angles of depression of the top and the bottom of a tree are 30º and 45º respectively. What is the height of the tree?


What is the value of sinx √( 1 /1+cosx + 1 /1-cosx ) ?

What is cos4 A - sin4 A / cos2 A - sin2 A equal to?

If 7sin2 x +3cos2 x = 4, 0 < x < 90º ,then what is the value of tan x?

If x = a cosθ + b sinθ and y = a sinθ - b cosθ then what is x2 + y2 equal to?


The mean of 5 numbers is 15. If one more number is included, the mean of the 6 numbers becomes 17. What is the included number?

The mean marks obtained by 300 students in a subject are 60. The mean of top 100 students was found to be 80 and the mean of last 100 students was found to be 50. The mean marks of the remaining 100 students are?

In an asymmetrical distribution, of the mean and median of the distribution are 270 and 220 respectively, then the mode of the data is?

Let a, b, c, d, e, f, g be consecutive even numbers and j, k, l, m, n be consecutive odd numbers. What is the average of all the numbers?

Alligation or Mixture

25 kg of alloy X is mixed with 125 kg of alloy Y. If the amount of lead and tin in the alloy X is the ratio 1 : 2 and the amount of lead and tin in the alloy Y is in the ratio 2 : 3, then what is the ratio of lead to tin in the mixture?


The ratio of two numbers is 1 : 5 and their product is 320. What is the difference between the square of these two numbers?


What is the value of cot 4π/3 ?

Indian Politics

Article-24 of the Indian Constitution ‘Prohibition of employment of children in factories, etc’ deals with?

Article-134A of the Indian Constitution ‘Certificate for appeal to the Supreme Court’ deals with?


Who invented Aspirin?


A larger force on a rotating body results in larger?

What is the unit of the physical quantity, magnetic flux density?