From b5f177939f5a8bac34cc89b010cb600653ac5f08 Mon Sep 17 00:00:00 2001 From: Teri Glover Date: Wed, 21 Jul 2021 05:01:39 +0000 Subject: [PATCH] docs: Edits to remove jargon (#42907) PR Close #42907 --- aio/content/guide/attribute-binding.md | 18 +++++------ aio/content/guide/event-binding.md | 4 +-- aio/content/guide/inputs-outputs.md | 16 +++++----- aio/content/guide/interpolation.md | 10 +++--- aio/content/guide/pipes.md | 32 +++++++++---------- aio/content/guide/property-binding.md | 6 ++-- aio/content/guide/svg-in-templates.md | 2 +- .../guide/template-reference-variables.md | 16 +++++----- aio/content/guide/template-statements.md | 4 +-- aio/content/guide/template-syntax.md | 13 ++++---- aio/content/guide/two-way-binding.md | 4 +-- 11 files changed, 62 insertions(+), 63 deletions(-) diff --git a/aio/content/guide/attribute-binding.md b/aio/content/guide/attribute-binding.md index b56c104ce2..42e7c416e8 100644 --- a/aio/content/guide/attribute-binding.md +++ b/aio/content/guide/attribute-binding.md @@ -13,7 +13,7 @@ See the for a working example containing the code It is recommended that you set an element property with a [property binding](guide/property-binding) whenever possible. However, sometimes you don't have an element property to bind. -In those situations, you can use attribute binding. +In those situations, use attribute binding. For example, [ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) and [SVG](https://developer.mozilla.org/en-US/docs/Web/SVG) are purely attributes. @@ -58,7 +58,7 @@ To use attribute binding with the `` attribute `colspan`: 1. Specify the `colspan` attribute by using the following syntax: `[attr.colspan]`. 1. Set `[attr.colspan]` equal to an expression. -In the following example, we bind the `colspan` attribute to the expression `1 + 1`. +In the following example, you bind the `colspan` attribute to the expression `1 + 1`. @@ -78,7 +78,7 @@ For more information on how to bind to the `colSpan` property, see the [`colspan {@a class-binding} ## Binding to the `class` attribute -You can use class binding to add and remove CSS class names from an element's `class` attribute. +Use class binding to add and remove CSS class names from an element's `class` attribute. ### Binding to a single CSS `class` @@ -161,7 +161,7 @@ The following table summarizes class binding syntax. {@a style-binding} ## Binding to the style attribute -You can use style binding to set styles dynamically. +Use style binding to set styles dynamically. ### Binding to a single style @@ -263,7 +263,7 @@ The following table summarizes style binding syntax.
The [NgStyle](guide/built-in-directives/#ngstyle) directive can be used as an alternative to direct `[style]` bindings. -However, using the above style binding syntax without `NgStyle` is preferred because due to improvements in style binding in Angular, `NgStyle` no longer provides significant value, and might eventually be removed in the future. +However, using the preceding style binding syntax without `NgStyle` is preferred because due to improvements in style binding in Angular, `NgStyle` no longer provides significant value, and might eventually be removed in the future.
@@ -294,7 +294,7 @@ When there are multiple bindings to the same class name or style property, Angul The more specific a class or style binding is, the higher its precedence. -A binding to a specific class (for example, `[class.foo]`) will take precedence over a generic `[class]` binding, and a binding to a specific style (for example, `[style.bar]`) will take precedence over a generic `[style]` binding. +A binding to a specific class (for example, `[class.foo]`) takes precedence over a generic `[class]` binding, and a binding to a specific style (for example, `[style.bar]`) takes precedence over a generic `[style]` binding. @@ -311,7 +311,7 @@ Directives often augment component behavior, so host bindings from components ha In addition, bindings take precedence over static attributes. -In the following case, `class` and `[class]` have similar specificity, but the `[class]` binding will take precedence because it is dynamic. +In the following case, `class` and `[class]` have similar specificity, but the `[class]` binding takes precedence because it is dynamic. @@ -319,14 +319,14 @@ In the following case, `class` and `[class]` have similar specificity, but the ` ### Delegating to styles with lower precedence It is possible for higher precedence styles to "delegate" to lower precedence styles using `undefined` values. -Whereas setting a style property to `null` ensures the style is removed, setting it to `undefined` will cause Angular to fall back to the next-highest precedence binding to that style. +Whereas setting a style property to `null` ensures the style is removed, setting it to `undefined` causes Angular to fall back to the next-highest precedence binding to that style. For example, consider the following template: Imagine that the `dirWithHostBinding` directive and the `comp-with-host-binding` component both have a `[style.width]` host binding. -In that case, if `dirWithHostBinding` sets its binding to `undefined`, the `width` property will fall back to the value of the `comp-with-host-binding` host binding. +In that case, if `dirWithHostBinding` sets its binding to `undefined`, the `width` property falls back to the value of the `comp-with-host-binding` host binding. However, if `dirWithHostBinding` sets its binding to `null`, the `width` property will be removed entirely. diff --git a/aio/content/guide/event-binding.md b/aio/content/guide/event-binding.md index b292d904bf..fafe1080a5 100644 --- a/aio/content/guide/event-binding.md +++ b/aio/content/guide/event-binding.md @@ -1,6 +1,6 @@ # Event binding -Event binding allows you to listen for and respond to user actions such as keystrokes, mouse movements, clicks, and touches. +Event binding lets you listen for and respond to user actions such as keystrokes, mouse movements, clicks, and touches.
@@ -26,7 +26,7 @@ The event binding listens for the button's click events and calls the component' ## Binding to passive events -Angular also supports passive event listeners. For example, you can use the following steps to make a scroll event passive. +Angular also supports passive event listeners. For example, use the following steps to make a scroll event passive. 1. Create a file `zone-flags.ts` under `src` directory. 2. Add the following line into this file. diff --git a/aio/content/guide/inputs-outputs.md b/aio/content/guide/inputs-outputs.md index b10223e650..c6177497af 100644 --- a/aio/content/guide/inputs-outputs.md +++ b/aio/content/guide/inputs-outputs.md @@ -1,7 +1,7 @@ # Sharing data between child and parent directives and components A common pattern in Angular is sharing data between a parent component and one or more child components. -You can implement this pattern by using the `@Input()` and `@Output()` directives. +To implement this pattern use the `@Input()` and `@Output()` directives.
@@ -21,8 +21,8 @@ Consider the following hierarchy: The `` serves as the context for the ``. `@Input()` and `@Output()` give a child component a way to communicate with its parent component. -`@Input()` allows a parent component to update data in the child component. -Conversely, `@Output()` allows the child to send data to a parent component. +`@Input()` lets a parent component update data in the child component. +Conversely, `@Output()` lets the child send data to a parent component. {@a input} @@ -80,14 +80,14 @@ The binding source, the part to the right of the equal sign, is the data that th ### Watching for `@Input()` changes -To watch for changes on an `@Input()` property, you can use `OnChanges`, one of Angular's [lifecycle hooks](guide/lifecycle-hooks). +To watch for changes on an `@Input()` property, use `OnChanges`, one of Angular's [lifecycle hooks](guide/lifecycle-hooks). See the [`OnChanges`](guide/lifecycle-hooks#onchanges) section of the [Lifecycle Hooks](guide/lifecycle-hooks) guide for more details and examples. {@a output} ## Sending data to a parent component -The `@Output()` decorator in a child component or directive allows data to flow from the child to the parent. +The `@Output()` decorator in a child component or directive lets data flow from the child to the parent.