Angular JS Interview Question Set 3

Categories: Angular JS

 How can you set, get, and clear cookies in AngularJS?

You can use:

  1. $cookies.put() method to set the cookies.
  2. $cookies.get() method to get the cookies.
  3. $cookies.remove to remove cookies in AngularJS.


Name the AngularJS components that can be injected as dependency

AngularJS components that can be injected as a dependency are: 1) value, 2) factory, 3) service, 4) provider, 5) constant.


What are the common Angular Global API functions

Some commonly used Angular Global API functions are:

  1. Angular.isString: It will return true only if the given reference is of type string.
  2. Angular.lowercase: It converts any string to lowercase
  3. Angular.uppercase: It converts any string to uppercase.
  4. Angular.isNumber: It returns true only if the reference is a numeric value or number.


 What is BOM(Browser Object Model)?

BOM or Browser Object Model consists of history, object navigator, screen location, etc. It specifies the global browser objects like console, local storage, and window.


Explain “$rootScope” in AngularJS

“$rootScope” is a scope that is created on the DOM (Document Object Model) element.

An application can have only one $rootScope that shares, among other components. It has the ng-app directive. Other scopes are called as its child scope. It can watch expressions as well as propagate events.



 What is the syntax of factory method in AngularJS?

The syntax of Factory is as follows:

app.factory(‘serviceName’,function(){ return serviceObj;})



Name different phases of the AngularJS Scope lifecycle.

Here, are different phases of AngularJS Scope lifecycle:

  1. Creation
  2. Model mutation
  3. Watcher registration
  4. Mutation observation
  5. Scope destruction


What is a single page application in AngularJS?

SPA or single page application is a website or web application which interacts with the users dynamically. In AngularJS, JavaScript, HTML, and CSS fit on a single page. It performs navigation without refreshing the whole HTML page.


Explain the concept of webpack

Webpack is a module bundler for Angular2 or above. It bundles, transpiles, and minifies AngularJS application.


What do you mean by NPM?

NPM stands for Node Package Manager. It consists of a command line tool client for interacting with the repository of Node.js project.


 How can you create a new project in angularJS using Command Line Interface?

Once you install the Angular command-line interface, you have to run ng new project-name command in order to create a new project in Angular.

Top Blogs
Dependency Injection and AngularJS Routes Published at:- AngularJS Templates, Views, Models, Controllers Published at:- Integrating AngularJS with Other Frameworks Published at:- Testing AngularJS Applications in the IDE Published at:- End-to-End Testing with Protractor Published at:- AngularJS Views and Bootstrap Published at:- Adding a New Blog Controller Published at:- Adding a New Blog Template In Angular JS Published at:- Ways to Communicate with REST Services Published at:- Services and Business Logic and Handling User Authentication in Angular JS Published at:- Using Basic Authentication, Creating AngularJS Services, Holding User Credentials in Angular JS Published at:- AngularJS Security : why we are covering security in a book on AngularJS Published at:- MEAN Cloud and Mobile, Local Deployment and Installing Node.js, npm, and MongoDB in Angular Published at:- Angular Js MCQ Quiz (Multiple Choice Question and answers) for beginners Published at:- Angular 4 Questions - Angular 4 Quiz (MCQ) Published at:- AngularJS MCQ Quiz Questions with Answer Part 2 Published at:- AngularJS MCQ Quiz Questions with Answer Published at:- AngularJS MCQ Quiz Questions with Answer Published at:- Angular JS Interview Question Set 1 Published at:- Angular JS Interview Question Set 2 Published at:- Angular JS Interview Question Set 3 Published at:- Angular JS Interview Question Set 3 Published at:- Angular JS Interview Question Set 4 Published at:- Angular JS Interview Question Set 5 Published at:- Angular JS Interview Question Set 6 Published at:- Angular JS Interview Question Set 6 Published at:- Angular JS Interview Question Set 8 Published at:- Angular JS Interview Question Set 9 Published at:- Angular JS Interview Question Set 10 Published at:- Angular JS Interview Question Set 11 Published at:- Angular JS Interview Question Set 12 Published at:- React versus Angular What Would it be advisable for You Pick Published at:- 9 Advantages of Angular you really want to be aware if you have any desire to assemble Computerized Items Published at:- Top 20 Angular 10 Inquiries Questions and Answer Published at:- 9 Advantages of Angular you want to be aware to assemble Advanced Items Published at:- Top 5 Elements Angular Favored Decision for Web Improvement Published at:- Exploring the Latest Version of AngularJS: What's New and Exciting Published at:-
R4R.co.in Team
The content on R4R is created by expert teams.