• AngularJS Video Tutorials

AngularJS - Mock Test


This section presents you various set of Mock Tests related to AngularJS Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.

Questions and Answers

AngularJS Mock Test I

Q 2 - Is AngularJS open source?

A - true

B - false

Answer : A

Explaination

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.

Q 3 - Are application written using AngularJS cross browser compliant?

A - true

B - false

Answer : A

Explaination

True! Applications written in AngularJS are cross-browser compliant. AngularJS automatically handles JavaScript code suitable for each browser.

Q 5 - Which directive is used for data binding in AngularJS?

A - ng-data

B - ng-app

C - ng-bind

D - ng-controller

Answer : C

Explaination

ng-bind directive is used in data binding.

Answer : D

Explaination

When the page is loaded in the browser; HTML document is loaded into the browser, and evaluated by the browser. AngularJS JavaScript file is loaded; the angular global object is created. Next, JavaScript which registers controller functions is executed.

Answer : D

Explaination

Controllers are JavaScript functions that are bound to a particular scope. They are the prime actors in AngularJS framework and carry functions to operate on data and decide which view is to be updated to show the updated model based data.

Answer : A

Explaination

Services are singleton objects which are instantiated only once in app and are used to do the defined task.

Answer : C

Explaination

Filters select a subset of items from an array and return a new array. Filters are used to show filtered items from a list of items based on defined criteria.

Answer : A

Explaination

Deep linking allows you to encode the state of application in the URL so that it can be bookmarked. The application can then be restored from the URL to the same state.

Q 12 - Is AngularJS code unit testable?

A - false

B - true

Answer : B

Explaination

AngularJS code is unit testable.

Q 13 - Do AngularJS provide reusable components?

A - false

B - true

Answer : B

Explaination

AngularJS provides reusable components.

Q 14 - Which of the following is not a core AngularJS directive.

A - ng-app

B - ng-model

C - ng-bind

D - ng-state

Answer : D

Explaination

ng-state is not an AngularJS directive.

Answer : C

Explaination

ng-app directive defines and links an AngularJS application to HTML. It also indicate the start of the application.

Answer : C

Explaination

ng-model directive binds the values of AngularJS application data to HTML input controls. It creates a model variable which can be used with the html page and within the container control( for example, div) having ng-app directive.

Answer : D

Explaination

ng-bind directive binds the AngularJS Application data to HTML tags. ng-bind updates the model created by ng-model directive to be displayed in the html tag whenever user input something in the control or updates the html control's data when model data is updated by controller.

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.

Answer : C

Explaination

ng-init directive initializes an AngularJS Application data. It is also used to put values to the variables to be used in the application.

Answer : D

Explaination

Expressions are used to bind application data to html. Expressions are written inside double braces like {{ expression}}. Expressions behave in same way as ng-bind directives. AngularJS application expressions are pure JavaScript expressions and outputs the data where they are used.

Answer : B

Explaination

MVC stands for Model View Controller.

Answer : B

Explaination

Model View Controller or MVC as it is popularly called, is a software design pattern for developing web applications.

Answer : C

Explaination

Model is the lowest level of the pattern responsible for maintaining data.

Answer : B

Explaination

View is responsible for displaying all or a portion of the data to the user.

Answer : C

Explaination

It is a software Code that controls the interactions between the Model and View.

Answer Sheet

Question Number Answer Key
1 D
2 A
3 A
4 C
5 C
6 D
7 B
8 D
9 A
10 C
11 A
12 B
13 B
14 D
15 C
16 C
17 D
18 D
19 C
20 D
21 B
22 B
23 C
24 B
25 C
angularjs_questions_answers.htm
Advertisements