๐Ÿงช Angular JS MCQ Quiz Hub

AngularJS MCQ Questions

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

1. What is controller in MVC?




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




3. Which of the following is true about $error?




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




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




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




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




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




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




10. Which of the following service converts object to the string?




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




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




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




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




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




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




17. Angular JS is developed by ______.




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




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




20. Which among the following is an AngularJS Directives?




21. What is an Angular JS?




22. AngularJS is perfect for _______.




23. AngularJS is a _____.




24. AngularJS is distributed as a _______.




25. Who developed AngularJS?




26. Who maintained AngularJS?




27. AngularJS expressions are written inside _____.




28. Which directive can be used to write AngularJS expressions?




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




30. An AngularJS module defines an ______.




31. Which AngularJS function is used to create a module?




32. Which is the correct syntax to create a module?




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




34. Which prefix is used with the AngularJS directives?




35. Which directive initializes an AngularJS application?




36. Which directive initializes application data?




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




38. Which directive repeats an HTML element?




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




40. 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>




41. 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>




42. 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>




43. 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>




44. 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>




45. 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>




46. 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>




47. Which AngularJS function creates a new directive?




48. Which directive defines the application controller?




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




50. Which AngularJS filter formats a number to a currency format?




51. Which AngularJS filter formats a date to a specified format?




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




53. Which AngularJS filter formats an object to a JSON string?




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




55. Which AngularJS filter formats a string to lower case?




56. Which AngularJS filter formats a string to upper case?




57. Which AngularJS filter formats a number to a string?




58. Which AngularJS filter orders an array by an expression?




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




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




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




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




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




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




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




66. Which is not a valid method of $location service?




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




68. Which is not a valid method of $location service?




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




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




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




72. In AngularJS, what is the data binding?




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




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




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




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




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




78. 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>




79. The $event object contains the ______.




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




81. Which of the below is an Invalid filter in AngularJS?




82. The .subscribe in AngularJS is used for?