Briefly explain the concept of NgModule in Angular?

889    Asked by SamShukla in Python , Asked on Dec 15, 2019
Answered by Sam Shukla

NgModule is basically a class which is marked by @NgModule decorator. It configures the compiler and injector by taking the meta-data objects.

The functionality of NgModules metadata are:

It declares and specifies the components, pipes and directives to be public to the module.

It provides the services which other components in the application can use.

The basic AppModule which is generated by Angular CLI while creating a new application:

image

Your Answer

Interviews

Parent Categories