Top 50+ Solved AngularJS Core Concepts MCQ Questions Answer
Q. An Angular application can be initialized on ______?
a. Only HTML element
b. ANY element
c. none
d. all
Q. Can an HTML page have multiple “ng-app” directive for bootstrapping multipleAngularJS application?
a. Yes
b. No
c. none
d. all
Q. With more than one ng-app in an HTML document (an HTML page), are all of themautomatically initialized?
a. Yes
b. No
c. No, only one app is automatically initialized. Others have to manually initialized.
d. none of the above
Q. What are various possible prefixes such as 'ng-' using which Angular directives (forexample, ng-app) can be defined?
a. 'ng-', 'data-ng-', 'ng:'
b. 'ng-'
c. 'ng-', 'data-ng-', 'ng:', 'x-ng-'
d. 'ng-', 'data-ng-','x-ng-'
Q. What are various possible ways in which angular application can be initialized?
a. On an element, one could either put simply the attribute such as (ng-app, data-ng-app, ng:app, x-ng-app)
b. Put the named attribute such as (ng-app='demoApp')
c. Both of the above
d. none
Q. Can multiple angular applications be bootstrapped using same element??
a. Yes
b. No. An error is thrown such as 'App Already Bootstrapped with this Element'
c. none
d. all
Q. At framework level, how does Angular retrieve the matching elements for processing?
a. Makes use of jqLite(element) function.
b. If jQuery is used, jQuery(element) is used by way of assigning jQuery to jqLite variable
c. Both of the above
d. None of the above
Q. Which API need to be invoked on the rootScope service to get the child scopes?
a. new
b. $new
c. none
d. all
Q. Which angular function is used to wrap a raw DOM element or HTML string as a jQueryelement?
a. angular.element
b. angular.bootstrap
c. none
d. all
Q. Can '$scope' be injected while creating service using 'factory' method?
a. Yes
b. No
c. none
d. all