From 094f63aaf92c79062722674d50506fefc4cfd1c8 Mon Sep 17 00:00:00 2001 From: Ward Bell Date: Fri, 26 Aug 2016 10:02:49 -0700 Subject: [PATCH] docs(ngmodule): improved NgModule summary description closes #2203 --- public/docs/ts/latest/guide/ngmodule.jade | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/public/docs/ts/latest/guide/ngmodule.jade b/public/docs/ts/latest/guide/ngmodule.jade index 0239e5f62d..a315dda969 100644 --- a/public/docs/ts/latest/guide/ngmodule.jade +++ b/public/docs/ts/latest/guide/ngmodule.jade @@ -7,7 +7,12 @@ block includes :marked **Angular Modules** help organize an application into cohesive blocks of functionality. - An Angular Module _class_ is adorned with the **NgModule** decorator that defines metadata about the module. + An Angular Module is a _class_ adorned with the **@NgModule** decorator function. + `_@NgModule` takes a metadata object that tells Angular how to compile and run module code. + It identifies the module's _own_ components, directives and pipes, + making some of them public so external components can use them. + It may add service providers to the application dependency injectors. + And there are more options covered here. This chapter explains how to **create** `NgModule` classes and how to load them, either immediately when the application launches or later, as needed, via the [Router](router.html). @@ -74,10 +79,9 @@ a#angular-modularity An Angular module is a class decorated with `@NgModule` metadata. The metadata: - * declare which components, directives and pipes _belong together_. + * declare which components, directives and pipes _belong_ to the module. * make some of those classes public so that other component templates can use them. - * hide other classes as implementation details. - * import other modules with the components, directives and pipes it needs. + * 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. Every Angular app has at least one module class, the _root module_.