AngularJS Interview Questions and Answers

Orange Technomind 27-Sep-2019
orange technomind

AngularJS Interview Question and Answers
Orange TechnoMind would be the smart choice for you to choose and when it comes to a AngularJS training, it is the proper place to be. It has a strong team of experts to take challenges and deliver the excellent training.Thus AngularJS training in Chennai  has become essential for those who want to pursue their career in IT and make them fit well into the technical expertise criteria for the job. 
1.What is Angular.js?
AngularJS is a javascript framework used for developing single web page applications. It permits you to apply HTML as your template language and permits you to increase HTML’s syntax to specific your software’s components clearly
2.In which language, AngularJS is written?
3.Is it opensource?
Yes, It is free to use.
4.What Are The Main Features Of AngularJS ?
  1. Data-binding
  2. Scope
  3. Controllers
  4. Services
  5. Filters
  6. Directives
  7. Templates
  8. Routing
  9. MVC pattern
  10. Deep linking
  11. Dependency injection
5.Explain what is scope in Angular.js ?
Scope refers to the utility model, it acts like glue among application controller and the view. Scopes are arranged built-in hierarchical structure and impersonate the DOM ( document object model) structure of the application. it could watch expressions and propagate activities.
6.What is data binding in AngularJS?
Data binding is the automatic synchronization of information data between model and view components. ng-model directive is used in data binding.
7.What are the controllers in AngularJS?
Controllers are JavaScript functions that are built in to a specific scope. They are the prime actors in AngularJS framework and carry functions to operate on data and decide which view is to be updated to show the updated model based data.
8.What are the services in AngularJS?
AngularJS come with numerous built-in services. For example $https: service is used to make XMLHttpRequests (Ajax calls). Services are singleton objects which might be instantiated best only once in app.
9.What are the filters in AngularJS?
Filters choose a subset of items from an array and return a new array. Filters are used to reveal filtered items from a listing of items based on defined criteria.
10.Explain directives in AngularJS?
Directives are markers on DOM elements such as elements, attributes, css, and more Those may be used to create custom HTML tags that serve as new, custom widgets. AngularJS has built-in directives (ng-bind, ng-model, etc) to carry out maximum of the project that developers ought to do.
11.Explain templates in AngularJS?
Templates are the rendered view with data from the controller and model. those can be a single file (like index.html) or multiple perspectives in a single web page the use of "partials".
12.What is routing in AngularJS?
It is concept of switching views. AngularJS based controller makes a decision which view to render based on the business logic.
13.What is deep linking in AngularJS?
Deep linking allows you to encode the state of application with in the URL  in order that it can be bookmarked. The application can then be restored from the URL to the identical state.
14.What are the advantages of AngularJS?
  1. Able to create Single Page Application.
  2. data binding capability
  3. code is unit testable
  4. dependency injection
  5. reusable components
  6. run on all major browsers and smart phones 
  7. excellent experience to the end user
15.What are AngularJS expressions?
Expressions are used to bind utility data to html. Expressions are written inside the double braces like {{ expression}}. AngularJS application expressions are pure JavaScript expressions and outputs the information where they are used.
16.what the different types of Directive in AngularJS?
ng-app − This directive starts an AngularJS Application.
ng-init − This directive initializes application data.
ng-model − This directive ties the value of HTML controls (input, select, textarea) to application data.
ng-repeat − This directive repeats html elements for each item in a collection.
17.What are the key differences between AngularJS and jQuery?



It is a Javascript library

It is a Framework

used for DOM Manipulations

Used for creating SPA (Single Page Applications)

Easy to maintain when project size increases

Difficult to maintain when project size increases

Don't have two-way binding feature

Have two-way binding feature

JQuery is a tool

It is a Toolbox

18.What Are Different Types of Directives?
There are four types of directives:
Comment directives
CSS class directives
Attribute directives
Element directives
19.What is use of $routeProvider in AngularJS?
$routeProvider is the key administration which set the arrangement of urls, maps them with the comparing html website page or ng-layout, and appends a controller with the equivalent.
20.What is $rootScope?
Scope is a special JavaScript object which performs the role of joining controller with the views. Scope consists of  the model data. In controllers, model information is accessed via $scope object. $rootScope is the parent of all of the scope variables.
21.What is service method?
Using service method, we define a service after which assign the method to it.
22.Explain what are factory method in angularJs?
Factory method are used to create the directive. It is invoked most effective as soon as, when compiler matches the directive for the first time.
23.What are the differences between service and factory methods?
Factory method is is utilized to define a factory that could be later utilized  to create services as and when required whereas service method is used to create a service whose motive is to do some described task.
24.what is an injector?
An injector is a service locator.  It is used to retrieve object instances as described by provider, instantiate types, invoke methods and load modules.  There is a single injector per Angular application, it allows to look up an object instance by its name.
25.Which components can be injected as a dependency in AngularJS?
AngularJS gives a preferrred  Dependency Injection mechanism. It gives following core components which may be injected into every other as dependencies.
26.Is AngularJS extensible?
Yes Sure.In AngularJS we are able to create custom directive to extend AngularJS current functionalities.
27.On which types of component can we create a custom directive?
AngularJS gives support to create custom directives for following kind of elements.
Element directives − It actuates when a matching element is encountered.
Attribute −  Directive initiates when a coordinating attribute is experienced.
CSS − It actuates when a coordinating css style is experienced
Comment − It initiates when a matching comment is encountered.
28.What is a scope in AngularJS?
scope is an built-in object that refers to the application model. it's far the glue among utility controller and the view. Both the controllers and directives have reference to the scope, but now not with each different. It is an execution setting for expressions and organised in a progressive structure. Scopes can watch expressions and propagate events.
29.How to validate data in AngularJS?
AngularJS enriches form filling and validation. We are able to use $dirty and $invalid flags to do the validations in seamless manner. Use no validate property with a form declaration to disable any browser specific validation to ensure validation would done by Angular js.
Following may be used to track error.
•        $dirty − Denotes that value has been changed.
•        $invalid − Denotes that value entered is invalid.
•        $pristine The field value has not been modified yet.
•        $error − states the precise error.
30.How to implement internationalization in AngularJS?
AngularJS helps inbuilt internationalization for three types of filters currency, date and numbers. We best want to incorporate corresponding js according inline with locale of the country.

Contact Us

If you have a question, we have an answer. If you need something, we'll help you. Contact us anytime.

For enrollment related queries & support

+91 99 40 550 285

For technical issues & support