NgModules
NgModules
- The basic building blocks of an Angular application are NgModules
- NgModules which provide a compilation context for components.
- NgModules associate related code into functional sets.
- An Angular app is defined by a set of NgModules.
- An app always has at least a root module that enables bootstrapping that launches the application.
- NgModules can import functionality from other NgModules, and allow their own functionality to be exported and used by other NgModules.
NgModules are containers for a cohesive block of code dedicated to an application domain.
- They can contain components, service providers, and other code files whose scope is defined by the containing NgModule.
- They can import functionality that is exported from other NgModules,
- They export selected functionality for use by other NgModules.
- Every Angular app has at least one NgModule class,
- The root module, which is conventionally named AppModule and resides in a file named app.module.ts. You launch your app by bootstrapping the root NgModule.