๐Ÿงช Angular JS MCQ Quiz Hub

AngularJS MCQ Questions

Choose a topic to test your knowledge and improve your Angular JS skills

What is controller in MVC?





โœ… Correct Answer: 3

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





โœ… Correct Answer: 1

Which of the following is true about $error?





โœ… Correct Answer: 3

Angular JS belongs to the ..........





โœ… Correct Answer: 1

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





โœ… Correct Answer: 3

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





โœ… Correct Answer: 2

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





โœ… Correct Answer: 3

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





โœ… Correct Answer: 1

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





โœ… Correct Answer: 3

Which of the following service converts object to the string?





โœ… Correct Answer: 3

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





โœ… Correct Answer: 2

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





โœ… Correct Answer: 3

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





โœ… Correct Answer: 3

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





โœ… Correct Answer: 4

AngularJS applications are a mixture of ...........





โœ… Correct Answer: 2

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





โœ… Correct Answer: 1

Angular JS is developed by ______.





โœ… Correct Answer: 3

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





โœ… Correct Answer: 4

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





โœ… Correct Answer: 2

Which among the following is an AngularJS Directives?





โœ… Correct Answer: 4

What is an Angular JS?





โœ… Correct Answer: 3

AngularJS is perfect for _______.





โœ… Correct Answer: 1

AngularJS is a _____.





โœ… Correct Answer: 3

AngularJS is distributed as a _______.





โœ… Correct Answer: 1

Who developed AngularJS?





โœ… Correct Answer: 3

Who maintained AngularJS?





โœ… Correct Answer: 4

AngularJS expressions are written inside _____.





โœ… Correct Answer: 4

Which directive can be used to write AngularJS expressions?





โœ… Correct Answer: 2

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





โœ… Correct Answer: 1

An AngularJS module defines an ______.





โœ… Correct Answer: 2

Which AngularJS function is used to create a module?





โœ… Correct Answer: 4

Which is the correct syntax to create a module?





โœ… Correct Answer: 1

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





โœ… Correct Answer: 3

Which prefix is used with the AngularJS directives?





โœ… Correct Answer: 2

Which directive initializes an AngularJS application?





โœ… Correct Answer: 1

Which directive initializes application data?





โœ… Correct Answer: 2

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





โœ… Correct Answer: 3

Which directive repeats an HTML element?





โœ… Correct Answer: 4

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





โœ… Correct Answer: 4

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>





โœ… Correct Answer: 2

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>





โœ… Correct Answer: 1

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>





โœ… Correct Answer: 4

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>





โœ… Correct Answer: 1

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>





โœ… Correct Answer: 1

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>





โœ… Correct Answer: 4

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>





โœ… Correct Answer: 1

Which AngularJS function creates a new directive?





โœ… Correct Answer: 3

Which directive defines the application controller?





โœ… Correct Answer: 2

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





โœ… Correct Answer: 4

Which AngularJS filter formats a number to a currency format?





โœ… Correct Answer: 1

Which AngularJS filter formats a date to a specified format?





โœ… Correct Answer: 3

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





โœ… Correct Answer: 4

Which AngularJS filter formats an object to a JSON string?





โœ… Correct Answer: 2

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





โœ… Correct Answer: 1

Which AngularJS filter formats a string to lower case?





โœ… Correct Answer: 3

Which AngularJS filter formats a string to upper case?





โœ… Correct Answer: 3

Which AngularJS filter formats a number to a string?





โœ… Correct Answer: 1

Which AngularJS filter orders an array by an expression?





โœ… Correct Answer: 2

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





โœ… Correct Answer: 4

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





โœ… Correct Answer: 3

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





โœ… Correct Answer: 1

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





โœ… Correct Answer: 3

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





โœ… Correct Answer: 4

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





โœ… Correct Answer: 1

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





โœ… Correct Answer: 3

Which is not a valid method of $location service?





โœ… Correct Answer: 1

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





โœ… Correct Answer: 4

Which is not a valid method of $location service?





โœ… Correct Answer: 1

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





โœ… Correct Answer: 3

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





โœ… Correct Answer: 1

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





โœ… Correct Answer: 1

In AngularJS, what is the data binding?





โœ… Correct Answer: 3

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





โœ… Correct Answer: 1

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





โœ… Correct Answer: 3

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





โœ… Correct Answer: 4

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





โœ… Correct Answer: 1

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





โœ… Correct Answer: 2

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>





โœ… Correct Answer: 4

The $event object contains the ______.





โœ… Correct Answer: 1

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





โœ… Correct Answer: 4

Which of the below is an Invalid filter in AngularJS?





โœ… Correct Answer: 4

The .subscribe in AngularJS is used for?





โœ… Correct Answer: 3