- 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 Online Quiz
Following quiz provides Multiple Choice Questions (MCQs) related to Angular 2. 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.
Q 1 - Which of the following is correct about Angular 2 Components?
B - Components help to build the applications into many modules.
C - This helps in better maintaining the application over a period of time.
Answer : D
Explanation
All of the above options are correct.
Q 2 - Which of the following is true?
A - Angular 2 Service can be used to bring the modules together.
B - Angular 2 Template can be used to bring the modules together.
C - Angular 2 Component can be used to bring the modules together.
Answer : C
Explanation
Angular 2 Component can be used to bring the modules together.
Q 3 - 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 4 - 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 5 - Which of the following is correct about systemjs.config.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 : C
Explanation
systemjs.config.json contains the system files required for Angular JS application. This loads all the necessary script files without the need to add a script tag to the html pages.
Q 6 - Which of the following is correct about systemjs.config.json?
A - 'npm:': 'node_modules/' tells the location in our project where all the npm modules are located.
B - The mapping of app: 'app' tells the folder where all our applications files are loaded.
Answer : C
Explanation
'npm:': 'node_modules/' tells the location in our project where all the npm modules are located. The mapping of app: 'app' tells the folder where all our applications files are loaded.
Q 7 - Which of the following filter is used to slice a piece of data from the input string.
Answer : A
Explanation
slice filter is used to slice a piece of data from the input string.
Q 8 - Which of the following is correct about lifecycle hook - ngDoCheck.
A - When the value of a data bound property changes, then this method is called.
C - This is for the detection and to act on changes that Angular can't or won't detect on its own.
D - This is called in response after Angular projects external content into the component's view.
Answer : C
Explanation
ngDoCheck method is for the detection and to act on changes that Angular can't or won't detect on its own.
Q 9 - Which of the following is correct about lifecycle hook - ngOnDestroy.
A - This is called in response after Angular checks the content projected into the component.
B - This is called in response after Angular initializes the component's views and child views.
C - This is called in response after Angular checks the component's views and child views.
D - This is the cleanup phase just before Angular destroys the directive/component.
Answer : D
Explanation
ngOnDestroy method is the cleanup phase just before Angular destroys the directive/component.
To Continue Learning Please Login
Login with Google