Angular 5 Modules

Angular 5 Modules


Modules are a great way to organize an application and extend it with capabilities from external libraries. NgModules consolidate components, directives, and pipes into cohesive blocks of functionality, each focused on a feature area, application business domain, workflow, or common collection of utilities. Modules can also add services to the application. [Via].

Check your knowledge on Angular 5 Modules by answering these below questions:

1.
To be able to define modules we have to use the decorator . . . . . .

A) @Component
B) @NgModule
C) @Input
D) @angular

2.
Every Angular app has at least one module, the . . . . . . You bootstrap that module to launch the application.

A) uproot module
B) top module
C) basic module
D) root module

3.
The purpose of a NgModule is to declare each thing you create in Angular, and group them together (like Java packages or PHP / C# namespaces).

A) True
B) False

4.
Using . . . . . modules makes Angular applications easier to manage and maintain. . . . . . module is used to group related functionality together, such as the data repository classes in the data model.

A) JavaScript, feature
B) feature, JavaScript
C) feature, feature
D) JavaScript, JavaScript

5.
Any module providing you services only is to be imported . . . . . .

A) only once
B) twice
C) number of times
D) thrice

6.
The root module is a special Angular module that configures the entire application. One of its roles is to give Angular details of the features modules that the application requires.

A) True
B) False

7.
The root module is defined by applying the . . . . . decorator to a class.

A) @Module
B) @RtModule
C) @NgModule
D) @Output

8.
The four Angular Module Configuration properties are . . . . ., . . . . . , . . . . . and . . . . .

A) providers
B) imports
C) declarators
D) bootstrap
E) declarations

9.
Modules can be loaded eagerly . . . . . . . . .

A) when the application starts
B) lazy loaded asynchronously by the router
C) as and when required

10.
Add only . . . . . classes to an NgModule's declarations list.

A) declarable
B) non-declarable
C) initial
D) None of above

11.
. . . . . property is used to specify the Angular modules that the application requires.

A) imports
B) providers
C) declarations
D) bootstrap


Answers

No comments:

Post a Comment