×

Top 30 AngularJS Interview Questions and Answers for 2024

Most Frequently asked AngularJS Interview Questions and Answers for Fresher

Top 30 Angular-js interview Questions for Fresher and Experienced

1) Describe Angular JS ?

It is a powerful framework of JavaScript. AngularJS is used to design Rich Internet Application. This framework is developed on MVC (Model View Controller) which provide full feature of SPA (Single Page Application) Framework.

2) Give advantages and disadvantages of AngularJS.

Advantages of AngularJS
  1. User can easily create Single page Application
  2. Rich and Responsive experienced to user.
  3. Form Validation is already present.
  4. It is an open source framework.
  5. AngularJS is Platform (Browser) Independent.
  6. It supports Routers and two-way binding.
  7. A code of AngularJS is Unit testable.
Disadvantages of AngularJS
  1. Security: It is not secure as build on JavaScript Framework.
  2. User Dependent: If user disables the JavaScript then AngularJS cannot run.

3) Is jQuery or AngularJS interdependent?

NO, they are not interdependent.

4) Different IDE's that use AngularJS for development?

IDE's are Eclipse, Web Storm, Visual Studio, Text Mate etc.

5) Enlist the Features of AngularJS.

Some AngularJS Features are as Follow:
  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

6) Define and Enlist Directives of AngularJS.

AngularJS has DOM element Directives which act as Markers. They attach a specific behaviour to that DOM element and can even transform the DOM element and its children. Three main core directives are:
  • ng-app
  • ng-model
  • ng-bind

7) Define Controller in AngularJS?

In AngularJS to provide data and logic into HTML java script function is used which is known as Controller.

8) Give the use of controller.

  • Set up initial state of the $scope object
  • Add behaviour to the $scope object.

9) Define Data Binding in AngularJS?

Data binding is used to synchronize the view and model.

10) How are services used in AngularJS?

Services is a function or object that is used in AngularJS. Some of the inbuilt services are $location, $http etc. There are 30 built in services.

11) Define Scope in AngularJS?

Scope is the binding part between view(HTML) and controller(Java Script) through object. It has some properties and method which is available for both view and controller.

12) How to use template in AngularJS?

Template is used to obtain Dynamic view we uses template which consist of HTML+CSS+AngularJS Directives.

13) Write Expression in AngularJS?

It is similar to JavaScript Expression where it consists of literals, operators, and variables. Eg. {{1+1}} or {{Country+""+State}}.

14) Describe Filter and its use.

Filter is used to transform data it can be embedded in expression or directive. Eg. Currency, Uppercase, Lower case, Order by.

15) What is “$rootScope” in AngularJS?

$rootScopeData provides a seperation between View and its Model. It is the root directory all other scope is its child scope.

16) What is SPA in AngularJS?

SPA stands for Single Page Application which are web application. It loads a single HTML page and dynamically update that page as the user interacts with the app.

17) What is a Factory method in AngularJS?

Factory method is similar to the services. It is used to create new object and add functions as properties of this object and at the end we return this object.

18) What is REST in AngularJS?

REST stands for Representational State Transfer in AngularJS. It operates over HTTP requests over API. The requested URL identifies the data to be operated on, and the HTTP method identifies the operation that is to be performed.

19) What are the attributes can be used during creation of a new AngularJS Directives?

Following are the list of attributes:
  1. Restrict: This attribute consists of value "A" (directives to be triggered on the attribute name), "E" (only match element name), “C” (only match class name) and “M” (only match the comment name).
  2. TemplateUrl: The templateUrl attribute tells the AngularJS HTML compiler to replace custom directive inside a template with HTML content.
  3. Template: It specify an inline template as a string. Not used if you’re specifying your template as a URL.
  4. Replace: It has two values true or false. If true, replace the current element. If false or unspecified, append this directive to the current element.
  5. Transclude: It moves the original children of a directive to a location inside the new template.
  6. Scope: It create a new scope for this directive rather than inheriting the parent scope.
  7. Controller: It create a controller which publishes an API for communicating across directives.
  8. Require: It require that another directive be present for this directive to function correctly.
  9. Link: It modify resulting DOM element instances, add event listeners, and set up data binding.
  10. Compile: It modify the DOM template for features across copies of a directive, as when used in other directives.

20) What are the characterstics of Scope?

Data binding is used to synchronize the view and model.
  1. The $scope is the connection between the HTML and the View.
  2. $scope provides the execution context for the DOM and the expression
  3. $scope is modified when the View changes and the View is modified when $the scope changes its value.
  4. The $rootScope is the parent of all the $scope.
  5. $scope passes data and behavior to the View.

21) What is AngularJS BootStrap Process?

Bootstrap provide cross platform implementation of UI having consistency among internal tools. It is of two types:
  1. Automatic Bootstrap
  2. Manual Bootstrap

22) How would you specify that a scope variable should have one-time binding only?

We can specify the scope by using “::” in front of it. It allows you to check the available variable bindings in AngularJS.

23) Describe angular.copy() method in AngularJS?

angular.copy() method creates a deep copy of the variable. A deep copy of a variable means it doesn’t point to the same memory reference as that variable.

24) What is DDO Directive Definition Object?

DDO is an object used while creating a custome directive.

25) What is an interceptor?

An interceptor is a middleware code where all the $http requests go through. It is registered in $httpProvider. There are 2 types of requests that go through the interceptor, request and response.

27) How to hide HTML element via button click?

It can be done by using directive ng-hide in conjunction with a controller to hide an HTML element on button click.

28) What is injector?

The injector is a service locator. It is used to retrieve object instances as defined by provider, instantiate types, invoke methods and load modules.

29) Explain what is string interpolation in Angular.js ?

Compiler during the compilation process matches text and attributes using interpolate service to see if they contains embedded expressions.

30) How does the digest phase work?

In digest cycle all scope models are compared against their previous values. If changes are detected, the watches set on that model are fired. Then another digest cycle executes, and so on until all models are stable.

Related Topics

Top 18 UiPath Interview Questions for 2024

RPA UiPath Interview Questions and Answers for Fresher  1. What is RPA? RPA is an acronym for Robotic Process Automation. Robotic In RPA, Robotic is termed as an entity or machine which tries to...

7 minutes read.

Top 15 SQL Server Interview Question for 2024

1) Describe SQL Server? SQL server is a DataBase Management System developed by Microsoft. It was first introduced in year 2008 since, then many version has been introduced such as :...

2 minutes read.

Top 26 CouchDB interview questions for 2024

1) What is CouchDB? CouchDB is a document typed database server which can be accessed through RESTful JSON API. It is a schema free and Ad-hoc database with a flat address...

4 minutes read.

Top 30 Go Programming Language Interview Questions for 2024

1) What is Go Programming language? Go programming language is an open source programming language. It is developed at Google in 2007. It is designed for system programming language. 2) Who designed...

4 minutes read.

Top 30 CodeIgniter interview Questions for 2024

1) What is CodeIgniter? CodeIgniter is an open source PHP framework. It is used to develop web applications and websites. It is loosely based on MVC pattern and easy to use...

4 minutes read.

Top 20 HTTP Interview Questions for 2024

1) What is HTTP? HTTP stands for Hypertext Transfer Protocol. It is a set of rules for transferring of data on WWW (World Wide Web). 2) What are the basic Features of...

4 minutes read.

Backbone.js Interview Questions

1) What is Backbone.js? Backbone.js is a JavaScript framework or library. It is a client-side framework which helps in creating single page application in organized manner i.e. structured layout. 2) Backbone.js is...

4 minutes read.

Top 16 OpenStack Interview Questions for 2024

Most Frequently Asked OpenStack Interview Questions and Answers for Freshers 1. Describe OpenStack. OpenStack is designed as the future of cloud computing and developed as free and open-source software that facilitates a...

8 minutes read.

Django Interview Questions for 2024

Django is an open-source python web framework. It is very popular due to the functionalities it offers. It uses the Model-View-Template architecture. Many giant organizations are using Django as their...

10 minutes read.

Top 15 Ext Js Interview Question for 2024

1) What is Ext Js? Ext Js refers to Extended JavaScript. Ext JS is a JavaScript framework used to built interactive cross platform web application. 2) What are the features of Ext...

3 minutes read.

Top 30 Drupal Interview Questions for 2024

1) What is Drupal? Drupal is an open source CMS (Content Management System) framework. It is written in php and provides rich set of tools to create web sites. 2) What are...

4 minutes read.

Top 16 WebGL Interview Questions for 2024

1) What is WebGL? WebGL stands for Web Graphics Library. It is a JavaScript API that is used for rendering 3D graphic in any compatible web browser. It is written in...

3 minutes read.

Top 30 Perl interview questions for 2024

1) What is Perl? It is a programming language which is used for web development, system administration, GUI development and etc. It is also known as cross-platform programming language. 2) What are the...

4 minutes read.

Top 16 Moo Tools Interview Questions for 2024

1) What is Moo Tools? MooTools stands for My Object-Oriented Tools. It is a lightweight and object-oriented JavaScript framework. It is used to create dynamic web page. It is developed by Valerio...

5 minutes read.

Artificial Neural Network Interview Questions

1. Explain Neural Network?  Neural Network is a sequence of an algorithm that gives its best to recognize the underlying relationship in a data-set through a process. The artificial neural network...

8 minutes read.

Top 24 Clojure Interview Questions for 2024

1) What is Clojure? Clojure is a dynamic, general-purpose programming language. It is simple, coherent and powerful tool. It is based on Lisp Programming language. 2) Which platform is used to run...

4 minutes read.

Top 30 Joomla Interview Questions for 2024

1) What is Joomla? Joomla is an open source content management system. It is used to build online applications and websites. It uses model-view-controller (MVC) web application framework. It is free and easy to...

4 minutes read.

Top 30 PyTorch Interview Questions and Answers

Q1: What is PyTorch? Answer: PyTorch is a machine learning library for the programming language Python, based on Torch library, used for application such as natural language processing. It is free...

9 minutes read.

Bugzilla interview Questions

Frequently asked questions about Bugzilla Q1. What are reports in Bugzilla? A1. Reports can be defined as an interface between the user and the database of Bugzilla. It helps to examine and...

4 minutes read.

Top 30 Cobol Interview Questions for 2024

1) What is COBOL? COBOL is a programming language which is used for finance, business and administrative systems for companies. COBOL is stands for Common Business Oriented Language. 2) What are the features...

4 minutes read.