- AngularJS Tutorial
- AngularJS - Home
- AngularJS - Overview
- AngularJS - Environment Setup
- AngularJS - MVC Architecture
- AngularJS - First Application
- AngularJS - Directives
- AngularJS - Expressions
- AngularJS - Controllers
- AngularJS - Filters
- AngularJS - Tables
- AngularJS - HTML DOM
- AngularJS - Modules
- AngularJS - Forms
- AngularJS - Includes
- AngularJS - AJAX
- AngularJS - Views
- AngularJS - Scopes
- AngularJS - Services
- AngularJS - Dependency Injection
- AngularJS - Custom Directives
- AngularJS - Internationalization
- AngularJS Applications
- AngularJS - ToDo Application
- AngularJS - Notepad Application
- AngularJS - Bootstrap Application
- AngularJS - Login Application
- AngularJS - Upload File
- AngularJS - In-line Application
- AngularJS - Nav Menu
- AngularJS - Switch Menu
- AngularJS - Order Form
- AngularJS - Search Tab
- AngularJS - Drag Application
- AngularJS - Cart Application
- AngularJS - Translate Application
- AngularJS - Chart Application
- AngularJS - Maps Application
- AngularJS - Share Application
- AngularJS - Weather Application
- AngularJS - Timer Application
- AngularJS - Leaflet Application
- AngularJS - Lastfm Application
- AngularJS Useful Resources
- AngularJS - Questions and Answers
- AngularJS - Quick Guide
- AngularJS - Useful Resources
- AngularJS - Discussion
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.
AngularJS Mock Test III
Answer : A
Explaination
Child controller inherits the scope of its parent controller.
Q 2 - Which of the following is true about AngularJS service?
A - Services are JavaScript functions.
B - Services are responsible to do specific tasks only
Answer : D
Explaination
Services are JavaScript functions and are responsible to do specific tasks only. Each service is responsible for a specific task for example, $http is used to make ajax call to get the server data. $route is used to define the routing information and so on. Inbuilt services are always prefixed with $ symbol.
Answer : A
Explaination
Using service method, we define a service and then assign method to it.
Q 4 - Using factory method, we first define a factory and then assign method to it.
Answer : B
Explaination
Using factory method, we first define a factory and then assign method to it.
Q 5 - 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 6 - service method is used to create a service whose purpose is to do some defined task.
Answer : A
Explaination
service method is used to create a service whose purpose is to do some defined task.
Q 7 - Which components can be injected as a dependency in AngularJS?
Answer : D
Explaination
All of the above can be injected as dependency.
Q 8 - Which components can be injected as a dependency in AngularJS?
Answer : A
Explaination
Application Module can not be injected as dependency.
Q 9 - Which of the following is true about provider?
A - provider is used by AngularJS internally to create services, factory etc.
B - provider is used during config phase.
Answer : D
Explaination
provider is used by AngularJS internally to create services, factory etc. during config phase(phase during which AngularJS bootstraps itself). Below mention script can be used to create MathService that we've created earlier. Provider is a special factory method with a method get() which is used to return the value/service/factory.
Answer : A
Explaination
config phase is the phase during which AngularJS bootstraps itself.
Answer : A
Explaination
constants are used to pass values at config phase considering the fact that value cannot be used to be passed during config phase.
Answer : B
Explaination
Yes! In AngularJS we can create custom directive to extend AngularJS existing functionalities.
Q 13 - 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.
Answer : A
Explaination
Custom directives are defined using "directive" function.
Q 15 - On which of the following types of component can we create a custom directive?
Answer : D
Explaination
AngularJS provides support to create custom directives for following type of elements.
Element directives - Directive activates when a matching element is encountered.
Attribute - Directive activates when a matching attribute is encountered.
CSS - Directive activates when a matching css style is encountered.
Comment - Directive activates when a matching comment is encountered.
Q 16 - AngularJS supports inbuilt internationalization for three types of filters currency, date and numbers.
Answer : A
Explaination
AngularJS supports inbuilt internationalization for three types of filters currency, date and numbers.
Answer : A
Explaination
Scopes are objects that refer to the model. They act as glue between controller and view.
Answer : B
Explaination
Services are singleton objects which are instantiated only once in app.
Answer : A
Explaination
Filters select a subset of items from an array and return a new array.
Q 20 - Templates are the rendered view with information from the controller and model.
Answer : A
Explaination
Templates are the rendered view with information from the controller and model.
Q 21 - Templates can be a single file (like index.html) or multiple views in one page.
Answer : A
Explaination
Templates can be a single file (like index.html) or multiple views in one page using "partials".
Q 22 - 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.
Q 23 - AngularJS uses dependency injection and make use of separation of concerns.
Answer : B
Explaination
AngularJS uses dependency injection and make use of separation of concerns.
Q 24 - AngularJS provides capability to create Single Page Application in a very clean and maintainable way.
Answer : A
Explaination
AngularJS provides capability to create Single Page Application in a very clean and maintainable way.
Answer : B
Explaination
With AngularJS, developer writes less code and gets more functionality.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | A |
2 | D |
3 | A |
4 | B |
5 | A |
6 | A |
7 | D |
8 | A |
9 | D |
10 | A |
11 | A |
12 | B |
13 | A |
14 | A |
15 | D |
16 | A |
17 | A |
18 | B |
19 | A |
20 | A |
21 | A |
22 | A |
23 | B |
24 | A |
25 | B |
To Continue Learning Please Login
Login with Google