@@ -96,7 +96,7 @@ class MyComponent {
Although tokens used only as type specifiers are removed when converted to JavaScript, all tokens used for dependency injection are needed at runtime.
These effectively change `constructor(@Optional() other: OtherComponent)` to `constructor(@Optional() @Inject(OtherComponent) other)`.
-The token is now in a value position, and causes the tree shaker to retain the reference.
+The token is now in a value position, and causes the tree shaker to keep the reference.
@@ -107,7 +107,7 @@ For all services, a library should use [tree-shakable providers](guide/architect
## Using lightweight injection tokens
The lightweight injection token design pattern consists of using a small abstract class as an injection token, and providing the actual implementation at a later stage.
-The abstract class is retained \(not tree-shaken\), but it is small and has no material impact on the application size.
+The abstract class is retained, not tree-shaken, but it is small and has no material impact on the application size.
The following example shows how this works for the `LibHeaderComponent`.
@@ -152,9 +152,9 @@ To summarize, the lightweight injection token pattern consists of the following.
### Use the lightweight injection token for API definition
A component that injects a lightweight injection token might need to invoke a method in the injected class.
-Because the token is now an abstract class, and the injectable component implements that class, you must also declare an abstract method in the abstract lightweight injection token class.
-The implementation of the method \(with all of its code overhead\) resides in the injectable component that can be tree-shaken.
-This lets the parent communicate with the child \(if it is present\) in a type-safe manner.
+The token is now an abstract class. Since the injectable component implements that class, you must also declare an abstract method in the abstract lightweight injection token class.
+The implementation of the method, with all its code overhead, resides in the injectable component that can be tree-shaken.
+This lets the parent communicate with the child, if it is present, in a type-safe manner.
For example, the `LibCardComponent` now queries `LibHeaderToken` rather than `LibHeaderComponent`.
The following example shows how the pattern lets `LibCardComponent` communicate with the `LibHeaderComponent` without actually referring to `LibHeaderComponent`.
@@ -193,7 +193,7 @@ class LibCardComponent implement AfterContentInit {
-In this example the parent queries the token to obtain the child component, and stores the resulting component reference if it is present.
+In this example the parent queries the token to get the child component, and stores the resulting component reference if it is present.
Before calling a method in the child, the parent component checks to see if the child component is present.
If the child component has been tree-shaken, there is no runtime reference to it, and no call to its method.
@@ -203,7 +203,7 @@ Lightweight injection tokens are only useful with components.
The Angular style guide suggests that you name components using the "Component" suffix.
The example "LibHeaderComponent" follows this convention.
-To maintain the relationship between the component and its token while still distinguishing between them, the recommended style is to use the component base name with the suffix "`Token`" to name your lightweight injection tokens: "`LibHeaderToken`".
+You should maintain the relationship between the component and its token while still distinguishing between them. The recommended style is to use the component base name with the suffix "`Token`" to name your lightweight injection tokens: "`LibHeaderToken`."