AngularJS Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to AngularJS Framework. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
Q 2 - Which of the following is true about ng-controller directive?
A - ng-controller directive tells AngularJS what controller to use with this view.
C - A controller is a JavaScript object containing attributes/properties and functions.
Answer : D
Explaination
ng-controller directive tells AngularJS what controller to use with this view. AngularJS application mainly relies on controllers to control the flow of data in the application. A controller is a JavaScript object containing attributes/properties and functions. Each controller accepts $scope as a parameter which refers to the application/module that controller is to control.
Q 3 - What is Model in MVC?
A - Model represents server side data.
B - Model represents data stored in database.
C - Model is the lowest level of the pattern responsible for maintaining data.
Answer : C
Explaination
Model is the lowest level of the pattern responsible for maintaining data.
Q 4 - Which of the following is true about filter filter?
A - filter filter is a function which takes text as input.
B - filter filter is used to filter the array to a subset of it based on provided criteria.
Answer : B
Explaination
filter filter is used to filter the array to a subset of it based on provided criteria. It is simply added to AngularJS expression to filter out the result.
Q 5 - Which of the following is true about $error?
A - $error states that form has invalid data.
Answer : B
Explaination
$error states the exact error.
Q 6 - factory method is used to define a factory which can later be used to create services as and when required.
Answer : A
Explaination
factory method is used to define a factory which can later be used to create services as and when required.
Q 7 - Custom directives are used in AngularJS to extend the functionality of HTML.
Answer : A
Explaination
Custom directives are used in AngularJS to extend the functionality of HTML.
Q 8 - AngularJS applications can run on all major browsers and smart phones including Android and iOS based phones/tablets.
Answer : A
Explaination
AngularJS applications can run on all major browsers and smart phones including Android and iOS based phones/tablets.
Answer : B
Explaination
AngularJS uses two way data binding.
Answer : B
Explaination
In controllers, model data is accessed via $scope object.