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.

Questions and Answers

Answer : C

Explaination

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

Answer : A

Explaination

AngularJS expressions are written inside double braces like {{ expression}}.

Answer : C

Explaination

angular.module is used to create AngularJS modules along with its dependent modules. It is primarily used to create application module.

Q 5 - $http service is used to make an Ajax call to server.

A - false

B - true

Answer : B

Explaination

AngularJS provides $http control which works as a service to make ajax call to read data from the server.

Q 6 - Which components can be injected as a dependency in AngularJS?

A - Application Module

B - constant

C - value

D - factory

Answer : A

Explaination

Application Module can not be injected as dependency.

Q 7 - Custom directives are defined using "directive" function.

A - true

B - false

Answer : A

Explaination

Custom directives are defined using "directive" function.

Q 8 - Templates can be a single file (like index.html) or multiple views in one page.

A - true

B - false

Answer : A

Explaination

Templates can be a single file (like index.html) or multiple views in one page using "partials".

Q 9 - ng-init directive can be used to put values to the variables to be used in the application.

A - true

B - false

Answer : A

Explaination

ng-init directive can be used to put values to the variables to be used in the application.

Q 10 - We need to incorporate corresponding js according to locale of the country to support Internationalization in AngularJS based application.

A - true

B - false

Answer : A

Explaination

AngularJS supports inbuilt internationalization for three types of filters currency, date and numbers. We only need to incorporate corresponding js according to locale of the country. By default it handles the locale of the browser. For example, to use Danish locale, use following script

<script src="https://code.angularjs.org/1.2.5/i18n/angular-locale_da-dk.js"></script> 
angularjs_questions_answers.htm
Advertisements