Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

1) Which of the following statement is correct for

AngularJS?
a. AngularJS is an HTML framework
b. AngularJS is a Java framework
c. AngularJS is a JavaScript framework
d. AngularJS is a SQL framework
Hide Answer Workspace
Answer: C is the correct option. AngularJS is a
JavaScript framework.

2) On which of the Architectural pattern AngularJS is


based?
a. Observer Pattern
b. Decorator pattern
c. MVC Architecture pattern
d. MVVM Architectural pattern
Hide Answer Workspace
Answer: D is the correct option. AngularJS is based on
MVVM Architectural pattern.

3) AngularJS is perfect for?


a. SPAs
b. MPAs
c. DPAs
d. CPAs
Hide Answer Workspace
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?
a. (expression)
b. {{expression}}
c. {{{expression}}}
d. [expression]
Hide Answer Workspace
Answer: B is the correct option. The correct syntax for
writing AngularJS expressions is: {{expression}}

5) Do AngularJS provide reusable components?


a. Yes
b. No
Hide Answer Workspace
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?
a. ng-app directive
b. ng-model directive
c. ng-bind directive
d. ng-init directive
Hide Answer Workspace
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?
a. {{ expression | filter1 | filter2 | ... }}
b. {{ expression | {filter1} | {filter2} | ... }}
c. {{ expression - {filter1} - {filter2} - ... }}
d. {{ {filter1} | {filter2} | ...-expression}}
Hide Answer Workspace
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?
a. The lowercase filter converts a text to lower case
text.
b. The lowercase filter is a function that takes text as
input.
c. Both of the above.
d. None of the above.
Hide Answer Workspace
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?


a. AngularJS code is unit testable.
b. AngularJS provides reusable components.
c. AngularJS uses dependency injection and makes use
of separation of concerns.
d. All of the above
Hide Answer Workspace
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?
a. $dirty flag is used to state that value has been
changed.
b. $dirty flag is used to state that the form has invalid
data.
c. Both of the above.
d. None of the above.
Hide Answer Workspace
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. <div ng-app="""" ng-


init=""points=[1,15,19,2,40]"">
2. <p>The output is {{ points[2] }}</p>
3. </div>
a. The output is 1
b. The output is 15
c. The output is 19
d. The output is 2

Hide Answer Workspace


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?
a. Angular controllers are used for controlling the data.
b. Angular controllers are used for displaying the data.
c. Both of the above are correct.
d. None of the above is correct.
Hide Answer Workspace
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?
a. var myModule= angular.module();
b. var myModule= new Module();
c. module("app", []);
d. None of the above
Hide Answer Workspace
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?
a. using Model
b. using services
c. using factory
d. using $scope
Hide Answer Workspace
Answer: B: "using services" is the correct answer.

15) Which of the following statement specifies the data-


binding in AngularJS?
a. Synchronization of data between the model and
view components.
b. Synchronization of data between the model and
controller components.
c. Synchronization of data between the controller and
view components.
d. None of the above
Hide Answer Workspace
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?


a. lowercase
b. orderby
c. email
d. currency
Hide Answer Workspace
Answer: C is the correct option. The "email" is not a
valid AngularJS filter
17) Who is known as the father of AngularJS?
a. Brad Green
b. Misko Hevery
c. Adam Abrons
d. Mike Adams
Hide Answer Workspace
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?
a. ng-app
b. ng-init
c. ng-model
d. ng-hide
Hide Answer Workspace
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?
a. Twitter
b. Facebook
c. Google
d. Microsoft
Hide Answer Workspace
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?
a. Yes
b. No
Hide Answer Workspace
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?
a. module()
b. module()
c. mod()
d. angular module()
Hide Answer Workspace
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?
a. Element directives
b. Attribute
c. CSS
d. All of the above.
Hide Answer Workspace
Answer: D is the correct option. By using AngularJS, we
can create custom directives for the following type of
elements.
o Element directives: This is activated when a
matching element is encountered.
o Attribute: This is activated when a matching
attribute is encountered.
o CSS: This is activated when a matching CSS style
is encountered.
o Comment: This is activated when a matching
comment is encountered.

23) How many $RootScope an AngularJS application


can have?
a. Zero
b. One
c. Two
d. Infinity
Hide Answer Workspace
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?
a. A currency filter is used to format the text in a
currency format.
b. A currency filter is a function that takes text as input.
c. Both A and B
d. None of the above
Hide Answer Workspace
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?
a. A controller is a software code that controls the
interactions between the Model and View.
b. A controller is a software code that stores the data.
c. A controller is a software code that renders the user
interface.
d. All of the above.
Hide Answer Workspace
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?
a. Value
b. Factory
c. Constant
d. Application Module
Hide Answer Workspace
Answer: D is the correct answer. The "Application
Module" can be injected as a dependency in AngularJS.

27) What is deep linking in AngularJS?


a. Deep linking is an SEO-based technique.
b. Deep linking refers to linking various views to the
main page.
c. Deep linking allows you to encode the state of an
application in the URL so that it can be bookmarked.
d. All of the Above
Hide Answer Workspace
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?
a. HTML and PHP
b. HTML and JavaScript
c. HTML and TypeScript
d. PHP and JavaScript
Hide Answer Workspace
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?
a. Tag
b. Attribute
c. Class name
d. All of the above
Hide Answer Workspace
Answer: D is the correct answer.
30) Which of the following statement is true in the case
of $routeProvider?
a. It is a service.
b. It is a module.
c. It is a component.
d. None of the above.
Hide Answer Workspace
Answer: A is the correct answer. The $routeProvider is a
service.

31) Which of the following statement justify the working


of AngularJS?
a. module is primarily used to create application
modules.
b. module is used to create AngularJS modules along
with its dependent modules.
c. Both A and B
d. None of the above
Hide Answer Workspace
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.
a. TRUE
b. FALSE
c. Can be true or false
d. Cannot say
Hide Answer Workspace
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.
a. True
b. False
Hide Answer Workspace
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.
a. True
b. False
Hide Answer Workspace
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.
a. True
b. False
Hide Answer Workspace
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.
a. True
b. False
Hide Answer Workspace
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.
a. True
b. False
Hide Answer Workspace
Answer: A: True

38) AngularJS support two-way data binding.


a. True
b. False
Hide Answer Workspace
Answer: A: True.

39) AngularJS supports internationalization?


a. True
b. False
Hide Answer Workspace
Answer: A: True.

You might also like