AngularJs MCQ Questions And Answers
AngularJs MCQ : This section focuses on "Basics" of AngularJs. These Multiple Choice Questions (MCQ) should be practiced to improve the AngularJs skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. AngularJS is perfect for?
A. SPAs
B. MPAs
C. DPAs
D. ZPAs
View Answer
Ans : A
Explanation: AngularJS extends HTML with new attributes.AngularJS is perfect for Single Page Applications (SPAs).AngularJS is easy to learn
2. AngularJS version 1.0 was released in?
A. 2011
B. 2012
C. 2013
D. 2014
View Answer
Ans : B
Explanation: AngularJS version 1.0 was released in 2012.Miško Hevery, a Google employee, started to work with AngularJS in 2009.The idea turned out very well, and the project is now officially supported by Google.
3. AngularJS is a ?
A. Java framework
B. HTML framework
C. JavaScript framework
D. SQL framework
View Answer
Ans : C
Explanation: AngularJS is a JavaScript framework.
4. It can be added to an HTML page with a _______ tag.
A. style tag
B. script tag
C. php tag
D. using mysql
View Answer
Ans : B
Explanation: It can be added to an HTML page with a <script> tag.AngularJS extends HTML attributes with Directives, and binds data to HTML with Expressions.
5. Which directive binds application data to the HTML view?
A. ng-app
B. ng-model
C. ng-bind
D. ng-init
View Answer
Ans : C
Explanation: The ng-bind directive binds application data to the HTML view.
6. Which directive binds the value of the input field to the application variable name?
A. ng-app
B. ng-model
C. ng-bind
D. ng-init
View Answer
Ans : B
Explanation: The ng-model directive binds the value of the input field to the application variable name.
7. can we use data-ng-, instead of ng-, if we want to make your page HTML valid?
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A
Explanation: Yes, we use data-ng-, instead of ng-, if we want to make your page HTML valid
8. AngularJS expressions are written inside?
A. { }
B. ()
C. []
D. {{ }}
View Answer
Ans : D
Explanation: AngularJS expressions are written inside double braces: {{ expression }}.
9. AngularJS expressions bind AngularJS data to HTML the same way as the _________ directive.
A. ng-app
B. ng-model
C. ng-bind
D. ng-init
View Answer
Ans : C
Explanation: AngularJS expressions bind AngularJS data to HTML the same way as the ng-bind directive.
10. Which of the following is true about AngularJs?
A. AngularJS is a very powerful JavaScript Framework
B. It extends HTML DOM with additional attributes and makes it more responsive to user actions.
C. AngularJS is open source, completely free, and used by thousands of developers around the world.
D. All of the above
View Answer
Ans : D
Explanation: AngularJS is a very powerful JavaScript Framework. It is used in Single Page Application (SPA) projects. It extends HTML DOM with additional attributes and makes it more responsive to user actions. AngularJS is open source, completely free, and used by thousands of developers around the world. It is licensed under the Apache license version 2.0.
11. Which of the following is an Advantages of AngularJS?
A. AngularJS code is unit testable.
B. AngularJS provides reusable components.
C. AngularJS uses dependency injection and make use of separation of concerns.
D. All of the above
View Answer
Ans : D
Explanation: All of the above statement is an Advantages of AngularJS.
12. What will be output for the following code?
<div ng-app="""" ng-init=""quantity=1;cost=5"">
<p>Total in dollar: {{ quantity * cost }}</p>
</div>
A. Total in dollar: 5
B. 5
C. Total in dollar: 10
D. Total in dollar:
View Answer
Ans : A
Explanation: Total in dollar: 5 be output for the following code.
13. What will be output for the following code?
<div ng-app="""" ng-init=""points=[1,15,19,2,40]"">
<p>The third result is {{ points[2] }}</p>
</div>
A. The third result is 1
B. The third result is 15
C. The third result is 19
D. The third result is
View Answer
Ans : C
Explanation: The third result is 19 be output for the following code.
14. A module is created by using the AngularJS function?
A. module()
B. angular.module()
C. js.mod()
D. angular module()
View Answer
Ans : B
Explanation: A module is created by using the AngularJS function angular.module
15. The [] parameter in the module definition can be used to define dependent modules.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: The [] parameter in the module definition can be used to define dependent modules. Without the [] parameter, you are not creating a new module, but retrieving an existing one.
16. If the property in the ng-model attribute does not exist, AngularJS will not create one for you.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : B
Explanation: If the property in the ng-model attribute does not exist, AngularJS will create one for you.
17. ___________ in AngularJS is the synchronization between the model and the view.
A. Scops
B. Filter
C. Data binding
D. Service
View Answer
Ans : C
Explanation: Data binding in AngularJS is the synchronization between the model and the view.
18. Which of the following is true about currency filter?
A. Currency filter formats text in a currency format.
B. Currency filter is a function which takes text as input.
C. Both A and B
D. None of the above
View Answer
Ans : B
Explanation: Currency filter formats text in a currency format. It is simply added to AngularJS expression to filter out the result.
19. Which of the following can be used as a prefix for Directive?
A. ng-
B. x-
C. data-
D. All of the above
View Answer
Ans : D
Explanation: All of the above can be used as a prefix for Directive.
20. Which of the following is a filter in Angular Js?
A. currency
B. data
C. uppercase
D. All of the above
View Answer
Ans : D
Explanation: All of the above is a filter in Angular Js.
Discussion