Top 35+ Most Asked Angular MCQ

1) Which of the following statement is correct for AngularJS?

  1. AngularJS is an HTML framework
  2. AngularJS is a Java framework
  3. AngularJS is a JavaScript framework
  4. AngularJS is a SQL framework

Answer: C is the correct option. AngularJS is a JavaScript framework.


2) On which of the Architectural pattern AngularJS is based?

  1. Observer Pattern
  2. Decorator pattern
  3. MVC Architecture pattern
  4. MVVM Architectural pattern

Answer: D is the correct option. AngularJS is based on MVVM Architectural pattern.


3) AngularJS is perfect for?

  1. SPAs
  2. MPAs
  3. DPAs
  4. CPAs

Answer: A is the correct option. AngularJS is perfect for Single Page Applications (SPAs).


4) Which of the following is the correct syntax for writing AngularJS expressions?

  1. (expression)
  2. {{expression}}
  3. {{{expression}}}
  4. [expression]

Answer: B is the correct option. The correct syntax for writing AngularJS expressions is: {{expression}}


5) Do AngularJS provide reusable components?

  1. Yes
  2. No

Answer: A is the correct option. AngularJS provides reusable components.


6) Which of the following directive is used to bind the application data to the HTML view in AngularJS?

  1. ng-app directive
  2. ng-model directive
  3. ng-bind directive
  4. ng-init directive

Answer: C is the correct option. The ng-bind directive is used to bind the application data to the HTML view in the AngularJS application.


7) Which of the following syntax is correct for applying multiple filters in AngularJS?

  1. {{ expression | filter1 | filter2 | ... }}
  2. {{ expression | {filter1} | {filter2} | ... }}
  3. {{ expression - {filter1} - {filter2} - ... }}
  4. {{ {filter1} | {filter2} | ...-expression}}

Answer: A is the correct option. The syntax of applying multiple filters in AngularJS can be written as: {{ expression | filter1 | filter2 | ... }}


8) Which of the following statement is true about the lowercase filter?

  1. The lowercase filter converts a text to lower case text.
  2. The lowercase filter is a function that takes text as input.
  3. Both of the above.
  4. None of the above.

Answer: A is the correct option. The lowercase filter converts a text to lower case text. That's why it is added to the AngularJS expression to filter out the result.


9) Which of the following is an advantage of AngularJS?

  1. AngularJS code is unit testable.
  2. AngularJS provides reusable components.
  3. AngularJS uses dependency injection and makes use of separation of concerns.
  4. All of the above

Answer: D is the correct option. All of the above are the advantages of AngularJS.


10) Which of the following statement is true about $dirty flag?

  1. $dirty flag is used to state that value has been changed.
  2. $dirty flag is used to state that the form has invalid data.
  3. Both of the above.
  4. None of the above.

Answer: A is the correct option. The $dirty flag is used to state that value in the form has been changed.


11) What will be the output for the following code?

  1. The output is 1
  2. The output is 15
  3. The output is 19
  4. The output is 2

Answer: C is the correct option. "The output is 19" would be the correct output of the above code.


12) What is the use of Angular Controllers in the application?

  1. Angular controllers are used for controlling the data.
  2. Angular controllers are used for displaying the data.
  3. Both of the above are correct.
  4. None of the above is correct.

Answer: A is the correct option. Angular controllers are used to control the data.


13) Which of the following syntax is used to create a module in AngularJS?

  1. var myModule= angular.module();
  2. var myModule= new Module();
  3. module("app", []);
  4. None of the above

Answer: C is the correct option. To create a module in AngularJS, we use angular.module("app", []); syntax.


14) Which of the following is used to share data between controller and view in AngularJS?

  1. using Model
  2. using services
  3. using factory
  4. using $scope

Answer: B: "using services" is the correct answer.


15) Which of the following statement specifies the data-binding in AngularJS?

  1. Synchronization of data between the model and view components.
  2. Synchronization of data between the model and controller components.
  3. Synchronization of data between the controller and view components.
  4. None of the above

Answer: A is the correct option. Data-binding in AngularJS apps is the automatic synchronization of data between the model and view components.


16) Which of the following is not a valid AngularJS filter?

  1. lowercase
  2. orderby
  3. email
  4. currency

Answer: C is the correct option. The "email" is not a valid AngularJS filter


17) Who is known as the father of AngularJS?

  1. Brad Green
  2. Misko Hevery
  3. Adam Abrons
  4. Mike Adams

Answer: B is the correct answer. Misko Hevery was the inventor of AngularJS, so he is known as the father of AngularJS.


18) Which of the following directive is used to bind the value of HTML controls to application data?

  1. ng-app
  2. ng-init
  3. ng-model
  4. ng-hide

Answer: C is the correct option. The ng-app directive is used to initialize the AngularJS application. The ng-init directive is used to initialize the application data. The ng-model directive binds the value of HTML controls (input, select, textarea) to application data, and the ng-hide directive is used to hide or show the HTML elements.


19) Which of the following community Angular JS belong to?

  1. Twitter
  2. Facebook
  3. Google
  4. Microsoft

Answer: C is the correct option. AngularJS is a JavaScript-based open-source front-end web framework that belongs to Google and is mainly maintained by Google and a community of individuals and corporations.


20) Is AngularJS completely based on HTML and JavaScript?

  1. Yes
  2. No

Answer: A is the correct option. It is true that AngularJS completely based on HTML and JavaScript.


21) A module created by using the AngularJS function is called?

  1. module()
  2. module()
  3. mod()
  4. angular module()

Answer: B is the correct option. A module created by using the AngularJS function is called "angular.module".


22) Which of the following types of the component can be used to create a custom directive?

  1. Element directives
  2. Attribute
  3. CSS
  4. All of the above.

Answer: D is the correct option. By using AngularJS, we can create custom directives for the following type of elements.

  • Element directives: This is activated when a matching element is encountered.
  • Attribute: This is activated when a matching attribute is encountered.
  • CSS: This is activated when a matching CSS style is encountered.
  • Comment: This is activated when a matching comment is encountered.

23) How many $RootScope an AngularJS application can have?

  1. Zero
  2. One
  3. Two
  4. Infinity

Answer: B is the correct option. An AngularJS application can have only one $RootScope


24) Which of the following is true about the currency filter?

  1. A currency filter is used to format the text in a currency format.
  2. A currency filter is a function that takes text as input.
  3. Both A and B
  4. None of the above

Answer: B is the correct option. A currency filter is used to format the text in a currency format. It is added to the AngularJS expression to filter out the result.


25) Which of the following statement is true in the case of a controller in MVC?

  1. A controller is a software code that controls the interactions between the Model and View.
  2. A controller is a software code that stores the data.
  3. A controller is a software code that renders the user interface.
  4. All of the above.

Answer: B is the correct option. A controller is a software code that stores the data.


26) Which of the following components can be injected as a dependency in AngularJS?

  1. Value
  2. Factory
  3. Constant
  4. Application Module

Answer: D is the correct answer. The "Application Module" can be injected as a dependency in AngularJS.


27) What is deep linking in AngularJS?

  1. Deep linking is an SEO-based technique.
  2. Deep linking refers to linking various views to the main page.
  3. Deep linking allows you to encode the state of an application in the URL so that it can be bookmarked.
  4. All of the Above

Answer: C is the correct answer. Deep linking allows you to encode the state of an application in the URL so that it can be bookmarked.


28) AngularJS applications are a mix of which of the following technologies?

  1. HTML and PHP
  2. HTML and JavaScript
  3. HTML and TypeScript
  4. PHP and JavaScript

Answer: B is the correct answer. AngularJS applications are a mix of HTML and JavaScript.


29) Which of the following template can be used to write AngularJS directives?

  1. Tag
  2. Attribute
  3. Class name
  4. All of the above

Answer: D is the correct answer.


30) Which of the following statement is true in the case of $routeProvider?

  1. It is a service.
  2. It is a module.
  3. It is a component.
  4. None of the above.

Answer: A is the correct answer. The $routeProvider is a service.


31) Which of the following statement justify the working of AngularJS?

  1. module is primarily used to create application modules.
  2. module is used to create AngularJS modules along with its dependent modules.
  3. Both A and B
  4. None of the above

Answer: C is the correct answer as both the above statements are true.


32) The [] parameter in the module definition is used to define dependent modules.

  1. TRUE
  2. FALSE
  3. Can be true or false
  4. Cannot say

Answer: A: True. The [] parameter in the module definition is used to define dependent modules. Without the [] parameter, you cannot create a new module but retrieve an existing one.

True and False Questions

33) In AngularJS, the $http service is used to make an Ajax call to the server.

  1. True
  2. False

Answer: A: True. AngularJS provides $http control which works as a service to make the Ajax call read data from the server.


34) AngularJS facilitates developers to write less code and get more functionality.

  1. True
  2. False

Answer: A: This is a true statement as AngularJS facilitates developers to write less code and get more functionality.


35) While using the factory method, we must first define a factory and then assign a method to it.

  1. True
  2. False

Answer: A: This is a true statement. As using the factory method, we first define a factory and then assign a method to it.


36) OrderBy filter is applied to an expression using pipe character.

  1. True
  2. False

Answer: A: This is a true statement. The OrderBy filter is applied to an expression using pipe characters.


37) AngularJS application expressions are pure JavaScript expressions.

  1. True
  2. False

Answer: A: True


38) AngularJS support two-way data binding.

  1. True
  2. False

Answer: A: True.


39) AngularJS supports internationalization?

  1. True
  2. False

Answer: A: True.


Next Topic#