The NgModules in Angular 8 is used for the following things:
- The NgModule is a class marked by the @NgModule decorator where the @NgModule decorator is used to take a metadata object that describes how to compile a component’s template and how to create an injector at runtime.
- The NgModules is used to configure the injector and the compiler and also help to organize the related things together.
- The NgModule is used to identify the module’s own components, directives, and pipes. It can also make some of them public, through the exports property, to facilitate external components to use them.