What does @NgModule metadata do ?

An NgModule is a class decorated with @NgModule metadata. The metadata do the following:

  • Declare which components, directives, and pipes belong to the module.
  • Make some of those classes public so that other component templates can use them.
  • Import other modules with the components, directives, and pipes needed by the components in this module.
  • Provide services at the application level that any application component can use.

Leave a Reply

Your email address will not be published. Required fields are marked *