- Angular 2 Tutorial
- Angular 2 - Home
- Angular 2 - Overview
- Angular 2 - Environment
- Angular 2 - Hello World
- Angular 2 - Modules
- Angular 2 - Architecture
- Angular 2 - Components
- Angular 2 - Templates
- Angular 2 - Directives
- Angular 2 - Metadata
- Angular 2 - Data Binding
- CRUD Operations Using HTTP
- Angular 2 - Error Handling
- Angular 2 - Routing
- Angular 2 - Navigation
- Angular 2 - Forms
- Angular 2 - CLI
- Angular 2 - Dependency Injection
- Angular 2 - Advanced Configuration
- Angular 2 - Third Party Controls
- Angular 2 - Data Display
- Angular 2 - Handling Events
- Angular 2 - Transforming Data
- Angular 2 - Custom Pipes
- Angular 2 - User Input
- Angular 2 - Lifecycle Hooks
- Angular 2 - Nested Containers
- Angular 2 - Services
- Angular 2 Useful Resources
- Angular 2 - Questions and Answers
- Angular 2 - Quick Guide
- Angular 2 - Useful Resources
- Angular 2 - Discussion
Angular 2 Mock Test
This section presents you various set of Mock Tests related to Angular 2. 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.
Angular 2 Mock Test II
Q 1 - Which of the following is correct about Export Array in Angular 2 Modules?
B - This is used to export services which can then be used in other services.
Answer : A
Explanation
Angular 2 Export array is used to export components, directives, and pipes which can then be used in other modules.
Q 2 - Which of the following is correct about Import Array in Angular 2 Modules?
A - Import array can be used to import the functionality from other Angular JS modules.
Answer : A
Explanation
Angular 2 Import array can be used to import the functionality from other Angular JS modules.
Q 3 - Which of the following is correct about Angular 2 Directive?
A - A directive is a custom HTML element that is used to extend the power of HTML.
B - A directive can be used to import the functionality from other Angular JS modules.
Answer : A
Explanation
A directive is a custom HTML element that is used to extend the power of HTML.
Q 4 - Which of the following is correct about Angular 2 Error Handling?
A - This is done by including the ReactJS catch library and then using the catch function.
B - The catch function contains a link to the Error Handler function.
Answer : C
Explanation
Angular 2 applications have the option of error handling. This is done by including the ReactJS catch library and then using the catch function. The catch function contains a link to the Error Handler function.
Q 5 - Which of the following is correct about Angular 2 Routing?
B - Based on the option they choose, the required Angular Component will be rendered to the user.
Answer : C
Explanation
Angular 2 applications have the option of error handling. This is done by including the ReactJS catch library and then using the catch function. The catch function contains a link to the Error Handler function.
Q 6 - Which of the following is correct about CLI?
A - CLI stands for Command Line Interface.
B - CLI can be used to create Angular JS application.
C - It also helps in creating a unit and end-to-end tests for the application.
Answer : D
Explanation
Command Line Interface (CLI) can be used to create our Angular JS application. It also helps in creating a unit and end-to-end tests for the application.
Q 7 - Which of the following is correct about tsconfig.json?
A - This file is used to give the options about TypeScript used for the Angular JS project.
B - This file contains information about Angular 2 project.
C - This file contains the system files required for Angular JS application.
Answer : A
Explanation
tsconfig.json file is used to give the options about TypeScript used for the Angular JS project.
Q 8 - Which of the following is correct about tsconfig.json?
Answer : D
Explanation
The target for the compilation is es5 and that is because most browsers can only understand ES5 typescript. The sourceMap option is used to generate Map files, which are useful when debugging. Hence, during development it is good to keep this option as true. The "emitDecoratorMetadata": true and "experimentalDecorators": true is required for Angular JS decorators. If not in place, Angular JS application will not compile.
Q 9 - Which of the following is correct about package.json?
A - This file is used to give the options about TypeScript used for the Angular JS project.
B - This file contains information about Angular 2 project.
C - This file contains the system files required for Angular JS application.
Answer : B
Explanation
package.json contains information about Angular 2 project.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | A |
2 | A |
3 | A |
4 | C |
5 | C |
6 | D |
7 | A |
8 | D |
9 | B |