Angular JS/AngularJS MCQ Questions Sample Test,Sample questions

Question:
 AngularJS expressions are written inside _____.

1.{ expression }

2.[{ expression }]

3._expression

4.{{ expression }}

Posted Date:-2022-09-16 22:33:49


Question:
 AngularJS is a _____.

1.HTML Framework

2..Net Framework

3.JavaScript framework

4.Oracle Framework

Posted Date:-2022-09-16 22:26:13


Question:
 AngularJS is perfect for _______.

1.Create Single Page Applications

2. Creating a Desktop Application

3.Create Web Services

4.None of these

Posted Date:-2022-09-16 10:29:20


Question:
 Consider the below statement – what will be the output?

<div ng-app="" ng-init="cities=['Mumbai','New Delhi','Banglore']">
  <p>The cities...</p>
  <ul>
    <li ng-repeat="c in cities">
      {{ c }}
    </li>
  </ul>
</div>

1.Prints the city names in an unordered list

2.Prints the city names in an ordered list

3.Prints the all name of the city 3 times in an unordered list

4.None of the above

Posted Date:-2022-09-16 23:52:07


Question:
 Filters can be added to expressions by using the ______, followed by a filter.

1.comma character (,)

2.Colon character (:)

3. Hyphen character (-)

4.pipe character (|)

Posted Date:-2022-09-17 00:03:31


Question:
 In AngularJS, what is the data binding?

1.Synchronization between controller part and view part

2.Synchronization between model part and controller part

3.Synchronization between model part and view part

4.None of the above

Posted Date:-2022-09-17 00:43:05


Question:
 Which AngularJS directive is used to hide or show an HTML element?

1.ng-showHide

2.ng-ShowHide

3.ng-show

4.ng-hide

Posted Date:-2022-09-17 00:47:54


Question:
 Which AngularJS filter formats a number to a string?

1.number

2.integer

3.int

4.num

Posted Date:-2022-09-17 00:11:53


Question:
 Which directive defines the application controller?

1.ng-control

2.ng-controller

3. ng-NewController

4.None of the above

Posted Date:-2022-09-16 23:58:55


Question:
 Which directive initializes an AngularJS application?

1.ng-app

2.ng-init

3. ng-model

4.ng-application

Posted Date:-2022-09-16 22:43:23


Question:
 Which directive initializes application data?

1.ng-app

2.ng-init

3. ng-model

4.ng-application

Posted Date:-2022-09-16 22:44:22


Question:
 Which directive repeats an HTML element?

1.ng-repeats

2. ng-iterate

3.ng-model

4. ng-repeat

Posted Date:-2022-09-16 22:46:25


Question:
 Which is not a valid method of $location service?

1.hostname()

2.host()

3.path()

4.hash()

Posted Date:-2022-09-17 00:28:09


Question:
 Which is the correct syntax of AngularJS directive ng-show?

1.ng-show:"true/false"

2.ng-show="true/false"

3.ng-app ng-show="true/false"

4.None of the above

Posted Date:-2022-09-17 00:50:18


Question:
 Which is the correct syntax to create a module?

1.var variable_name = angular.module("app_name", []);

2.var variable_name = angular.module("app_name", []);

3.var variable_name = angular.module("app_name", []);

4.var variable_name = angular.module("app_name", []);

Posted Date:-2022-09-16 22:39:47


Question:
 Which is the correct syntax to define multiple filters on an expression?

1.{{ expression | filter1 | filter2 | filter3 | ... }}

2.{{ expression | {filter1} | {filter2} | {filter3} | ... }}

3.{{ expression | {{filter1}} | {{filter2}} | {{filter3}} | ... }}

4.{{ expression | filter1 , filter2 , filter3 , ... }}

Posted Date:-2022-09-17 00:18:19


Question:
 Which method of $location service is used to get the current URL without any parameters?

1. url()

2.absUrl()

3.path()

4.absPath()

Posted Date:-2022-09-17 00:26:43


Question:
 Which method of $location service is used to get the URL without base prefix?

1.url()

2.Url()

3.WebUrl()

4.absUrl()

Posted Date:-2022-09-17 00:24:59


Question:
 Which module routes your application to different pages without reloading the entire application?

1.ngRoutes

2.route

3.ng-Route

4.ngRoute

Posted Date:-2022-09-17 00:54:00


Question:
 Which of the below is an Invalid filter in AngularJS?

1.JSON

2.limitTo

3.orderBy

4.email

Posted Date:-2022-09-17 00:54:46


Question:
A controller that takes a single parameter called ........

1.$control

2.$param

3.$scont

4.$scope

Posted Date:-2021-10-29 10:34:05


Question:
An AngularJS module defines an ______.

1.expression

2.application

3.element

4. None of the above

Posted Date:-2022-09-16 22:37:48


Question:
Angular JS belongs to the ..........

1.Google

2.Facebook

3.Microsoft

4.IBM

Posted Date:-2021-10-29 10:34:05


Question:
Angular JS is developed by ______.

1.Facebook

2.Oracle

3.Google

4.Microsoft

Posted Date:-2021-10-29 10:34:05


Question:
Angular Routing provides ______ ways to include the ng-view directive in your application.

1.<div ng-view></div>

2.<ng-view></ng-view>

3.<div class="ng-view"></div>

4.All of the above

Posted Date:-2021-10-29 10:34:05


Question:
AngularJS applications are a mixture of ...........

1.HTML and PHP

2.HTML and JavaScript

3.HTML and CrossScript

4.HTML and AngularScript

Posted Date:-2021-10-29 10:34:05


Question:
AngularJS is distributed as a _______.

1.JavaScript file

2. PHP file

3. XML file

4. ASP file

Posted Date:-2022-09-16 22:27:06


Question:
Consider the below statement – what will be the output?

<div data-ng-app="" data-ng-init="qty=3;">
	<p>The result is: {{qty * price}}</p>
</div>

1.The result is: Undefined

2.The result is: 0

3.The result is: 3

4.The result is: NaN

Posted Date:-2022-09-16 23:50:10


Question:
Consider the below statement – what will be the output?

<div data-ng-app="" data-ng-init="qty=3;price=2.5">
	<p>The result is: {{qty * price}}</p>
</div>

1.The result is: 7.5

2.The result is: 7

3.The result is: 7.50

4.The result is: 3*2.5

Posted Date:-2022-09-16 23:49:12


Question:
Consider the below statement – what will be the output?

<div ng-app="" ng-init="cities=['Mumbai','New Delhi','Banglore']">
  <p>The cities...</p>
  <ul>
    <li ng-repeat="c in cities">
      "Hello" {{ c }}
    </li>
  </ul>
</div>

1.Prints the city names with "Hello" in an unordered list

2.Prints the city names with "Hello" in an ordered list

3.Prints the all name of the city with "Hello" 3 times in an unordered list

4.None of the above

Posted Date:-2022-09-16 23:53:53


Question:
Consider the below statement – what will be the output?

<div ng-app="" ng-init="num=10">
	<p ng-show="num > 5">Displaying: {{num}}</p>
</div>

1.Syntax Error

2.Nothing will display

3.Displaying: 5

4.Displaying: 10

Posted Date:-2022-09-17 00:51:35


Question:
Consider the below statement – what will be the output?

<div ng-app="" ng-init="values=[10, 20, 30]">
  <p>The value is {{values[0]}} + {{values[2]}}</p>
</div>

1.The value is 10 + 30

2.The value is 40

3.The value is NaN

4.The value is Undefined

Posted Date:-2022-09-16 23:56:29


Question:
Consider the below statement – what will be the output?

<div ng-app="" ng-init="values=[10, 20, 30]">
  <p>The value is {{values[0]}}, {{values[3]}}</p>
</div>

1.The value is 10, 30

2.The value is 10, 0

3.The value is 10, NaN

4.The value is 10,

Posted Date:-2022-09-16 23:55:05


Question:
Consider the below statement, how to print the value of "StudentName"?

<div ng-app="" ng-init="firstName='John'">
	<p>Input something in the input box:</p>
	<p>Name: <input type="text" ng-model="StudentName"></p>
	<p>You wrote: _______</p>
</div>

1.StudentName

2.{{ StudentName }}

3.{ StudentName }

4.{ _StudentName }

Posted Date:-2022-09-16 23:47:12


Question:
In the below given statement, "myApp" parameter refers to ____.

1.a JavaScript code in which the application will run

2.a JSON file

3.an HTML element in which the application will run

4.SQL queries

Posted Date:-2022-09-16 22:40:58


Question:
The $event object contains the ______.

1.browser's event object

2.browser's current path

3. Both A. and B.

4.None of the above

Posted Date:-2022-09-17 00:52:53


Question:
The .subscribe in AngularJS is used for?

1. Streams data synchronously

2.Streams data asynchronously

3.Both of the above

4.None of the above

Posted Date:-2022-09-17 00:56:11


Question:
What is an Angular JS?

1.AngularJS is a JavaScript-based open-source back-end web framework

2.AngularJS is a Python-based open-source back-end web framework

3.AngularJS is a JavaScript-based open-source front-end web framework

4.None of the above

Posted Date:-2021-10-29 10:34:05


Question:
What is controller in MVC?

1.A software Code that stores the data.

2.A software Code that renders the user interface.

3.A software Code that controls the interactions between the Model and View.

4.None of the Above

Posted Date:-2021-10-29 10:34:05


Question:
Which among the following is an AngularJS Directives?

1.ng-app

2.ng-init

3.ng-model

4.All of the above

Posted Date:-2021-10-29 10:34:05


Question:
Which AngularJS directive is used to bind AngularJS application data to the disabled attribute of HTML elements?

1.ng-disabled

2. ng-disable

3.ng-disabledElement

4.ng-disableElement

Posted Date:-2022-09-17 00:44:07


Question:
Which AngularJS directive is used to define AngularJS code that will be executed when the element is being clicked?

1.ng-click

2.ng-mouseOver

3.ng-mouseClick

4.ng-mouse

Posted Date:-2022-09-17 00:49:02


Question:
Which AngularJS directive is used to show or hide an HTML element?

1.ng-showHide

2.ng-ShowHide

3.ng-show

4.ng-hide

Posted Date:-2022-09-17 00:46:38


Question:
Which AngularJS filter formats a date to a specified format?

1.datetime

2.time

3.date

4.ng-date

Posted Date:-2022-09-17 00:05:15


Question:
Which AngularJS filter formats a number to a currency format?

1.currency

2.number

3.dollar

4.curr

Posted Date:-2022-09-17 00:04:15


Question:
Which AngularJS filter formats a string to lower case?

1.lwr

2.lower

3.lowercase

4.ng-lowercase

Posted Date:-2022-09-17 00:10:17


Question:
Which AngularJS filter formats a string to upper case?

1.upr

2.upper

3.uppercase

4. ng-uppercase

Posted Date:-2022-09-17 00:10:58


Question:
Which AngularJS filter formats an object to a JSON string?

1.ng-json

2.json

3.set-json

4.None of the above

Posted Date:-2022-09-17 00:07:05


Question:
Which AngularJS filter limits an array/string, into a specified number of elements/characters?

1.limitTo ng-

2.limit

3.nglimit

4.nglimit

Posted Date:-2022-09-17 00:09:25


Question:
Which AngularJS filter orders an array by an expression?

1.orderby

2.orderBy

3.order

4.OrderBy

Posted Date:-2022-09-17 00:12:35


Question:
Which AngularJS filter selects a subset of items from an array?

1.set

2.subset

3.ng-set

4.filter

Posted Date:-2022-09-17 00:06:08


Question:
Which AngularJS function creates a new directive?

1..new ...

2.create

3.directive

4.CreateDirective

Posted Date:-2022-09-16 23:57:13


Question:
Which AngularJS function is used to create a module?

1.module

2. ng-bind

3.angular.create

4.angular.module

Posted Date:-2022-09-16 22:38:49


Question:
Which AngularJS service has the set of methods to get the information about the location of the current web?

1.$web

2. $current

3.$location

4. All of the above

Posted Date:-2022-09-17 00:19:14


Question:
Which AngularJS service is the version of the window.setInterval function?

1.$interval

2.$WindowInterval

3.$WinInterval

4.$setInterval

Posted Date:-2022-09-17 00:41:05


Question:
Which AngularJS service is the version of the window.setTimeout function?

1.$timeout

2.$WindowTimeout

3. $WinTimeout

4.$setTimeout

Posted Date:-2022-09-17 00:39:54


Question:
Which AngularJS service is used to make the request to the server?

1.$https

2. $reques

3.t $http

4.$requests

Posted Date:-2022-09-17 00:38:08


Question:
Which directive binds the value of HTML controls to application data?

1.ng-app

2.ng-init

3. ng-model

4. ng-application

Posted Date:-2022-09-16 22:45:26


Question:
Which directive can be used to write AngularJS expressions?

1.ng-expression

2.ng-bind

3.ng-statement

4.ng-bindexpression

Posted Date:-2022-09-16 22:35:38


Question:
Which is not a valid method of $location service?

1.hostname()

2.host()

3.path()

4.hash()

Posted Date:-2022-09-17 00:35:20


Question:
Which is the correct AngularJS statement to format the value of "studentName" in the uppercase?

1.{{ studentName.uppercase }}

2. {{ uppercase(studentName) }}

3.{{ uppercase.studentName }}

4. {{ studentName | uppercase }}

Posted Date:-2022-09-17 00:13:38


Question:
Which is the correct syntax to write an AngularJS expression using the ng-bind directive?

1.ng-bind="expression"

2.ng-bind={expression}

3.ng-bind={"expression"}

4.ng-bind="{{expression}}"

Posted Date:-2022-09-16 22:37:03


Question:
Which method of $location service is used to get the full URL of the current web page?

1.url()

2.Url()

3.WebUrl()

4.absUrl()

Posted Date:-2022-09-17 00:24:00


Question:
Which method of $location service is used to get the search part of the current URL when called without any parameter?

1.searchPath()

2.absSearch()

3.ruleSearch()

4.search()

Posted Date:-2022-09-17 00:33:48


Question:
Which of the following angular function is used to manually start up an angular application?

1.angular.copy

2.angular.element

3.angular.bootstrap

4.None of the Above

Posted Date:-2021-10-29 10:34:05


Question:
Which of the following angular function is used to manually start up an angular application?

1.angular.copy

2.angular.element

3.angular.bootstrap

4.None of the Above

Posted Date:-2021-10-29 10:34:05


Question:
Which of the following can be used as a prefix for Directive?

1.data-

2.ng-

3.Both A and B

4.None of the above

Posted Date:-2022-09-17 00:17:11


Question:
Which of the following directive binds the values of application data to HTML input controls in angular JS?

1.ng-app

2.ng-model

3.ng-bind

4.None of the above

Posted Date:-2021-10-29 10:34:05


Question:
Which of the following directive is used to hide a given control?

1.ng- cover

2.ng- hide

3.ng- disbaled

4.None of the Above

Posted Date:-2021-10-29 10:34:05


Question:
Which of the following directive is used to initialize an angular app?

1.ng-app

2.ng-model

3.ng-controller

4.None of the Above

Posted Date:-2021-10-29 10:34:05


Question:
Which of the following directive is used to start an angularJS application?

1.ng-start

2.ng-begin

3.ng-app

4.None of the Above

Posted Date:-2021-10-29 10:34:05


Question:
Which of the following function is used to create a module?

1.add.module()

2.create.module()

3.angular.module()

4.None of the Above

Posted Date:-2021-10-29 10:34:05


Question:
Which of the following is a priority level of directives?Which of the following is a priority level of directives?

1.Level 1

2.Level 2

3.Level 3

4.All are Correct

Posted Date:-2021-10-29 10:34:05


Question:
Which of the following is true about $error?

1.$error states the exact error.

2.$error states that form has invalid data.

3.$error states the invalid error.

4.None of the Above

Posted Date:-2021-10-29 10:34:05


Question:
Which of the following is true about ng-show directive?

1.Ng-show directive can hide a given control.

2.Ng-show directive can show a given control.

3.Both A & B

4.None of the Above

Posted Date:-2021-10-29 10:34:05


Question:
Which of the following service converts object to the string?

1.$htpp

2.$interval

3.$httpParamSerializer

4.None of the Above

Posted Date:-2021-10-29 10:34:05


Question:
Which of the following service is used to communicate with a remote server?

1.$animate

2.$timeout

3.$http

4.None of the Above

Posted Date:-2021-10-29 10:34:05


Question:
Which of the following sign is used as a prefix for the built-in objects in AngularJS?

1.#

2.@

3.$

4.%

Posted Date:-2021-10-29 10:34:05


Question:
Which prefix is used with the AngularJS directives?

1.ag-

2.ng-

3.aj-

4. All of the above

Posted Date:-2022-09-16 22:42:03


Question:
Who developed AngularJS?

1. Jesse James Garrett

2.Douglas Crockford

3.Miško Hevery

4.Brendan Eich

Posted Date:-2022-09-16 22:30:46


Question:
Who maintained AngularJS?

1.Google

2.A community of individuals and corporations

3.Oracle

4. Both A. and B.

Posted Date:-2022-09-16 22:32:24


Question:
With the _____ you can define what page to display when a user clicks a link.

1.$routeCaller

2.$routeProvider

3.Both A and B

4.None of the above

Posted Date:-2021-10-29 10:34:05


Question:
Write a statement with <div> element to initialize two variables (name and age)?

1.<div ng-app="" ng-init="Name:'Alex';Age:21">

2.<div ng-app="" ng-init="Name:'Alex',Age:21">

3.<div ng-app="" ng-init="Name='Alex',Age=21">

4.<div ng-app="" ng-init="Name='Alex';Age=21">

Posted Date:-2022-09-16 23:46:01


More MCQS

  1. AngularJS MCQ Questions
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!