From e1146f3d066e653b9b40799cc436034e44af9160 Mon Sep 17 00:00:00 2001 From: Judy Bogart Date: Wed, 13 Jun 2018 09:28:12 -0700 Subject: [PATCH] docs: clarify wording in architecture overview (#24481) Closes #23463 Closes #22158 PR Close #24481 --- aio/content/guide/architecture-components.md | 8 ++++---- aio/content/guide/architecture-modules.md | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/aio/content/guide/architecture-components.md b/aio/content/guide/architecture-components.md index 4e9d61ac47..54b053ecf8 100644 --- a/aio/content/guide/architecture-components.md +++ b/aio/content/guide/architecture-components.md @@ -8,9 +8,10 @@ A _component_ controls a patch of screen called a *view*. For example, individua * The list of heroes. * The hero editor. -You define a component's application logic—what it does to support the view—inside a class. The class interacts with the view through an API of properties and methods. +You define a component's application logic—what it does to support the view—inside a class. +The class interacts with the view through an API of properties and methods. -For example, the `HeroListComponent` has a `heroes` property that returns an array of heroes that it acquires from a service. `HeroListComponent` also has a `selectHero()` method that sets a `selectedHero` property when the user clicks to choose a hero from that list. +For example, the `HeroListComponent` has a `heroes` property that holds an array of heroes. It also has a `selectHero()` method that sets a `selectedHero` property when the user clicks to choose a hero from that list. The component acquires the heroes from a service, which is a TypeScript [parameter property[(http://www.typescriptlang.org/docs/handbook/classes.html#parameter-properties) on the constructor. The service is provided to the component through the dependency injection system. @@ -39,8 +40,7 @@ Angular inserts an instance of the `HeroListComponent` view between those tags. * `templateUrl`: The module-relative address of this component's HTML template. Alternatively, you can provide the HTML template inline, as the value of the `template` property. This template defines the component's _host view_. -* `providers`: An array of **dependency injection providers** for services that the component requires. In the example, this tells Angular that the component's constructor requires a `HeroService` instance -in order to get the list of heroes to display. +* `providers`: An array of **dependency injection providers** for services that the component requires. In the example, this tells Angular how provide the `HeroService` instance that the component's constructor uses to get the list of heroes to display.
diff --git a/aio/content/guide/architecture-modules.md b/aio/content/guide/architecture-modules.md index 5e0af13e81..055baae754 100644 --- a/aio/content/guide/architecture-modules.md +++ b/aio/content/guide/architecture-modules.md @@ -88,7 +88,8 @@ For example, import Angular's `Component` decorator from the `@angular/core` lib -You also import NgModules from Angular _libraries_ using JavaScript import statements: +You also import NgModules from Angular _libraries_ using JavaScript import statements. +For example, the following code imports the `BrowserModule` NgModule from the `platform-browser` library: