From 9ec21f77fd2240ceb4def989c09bc93d9b28bdd6 Mon Sep 17 00:00:00 2001 From: Zhicheng WANG Date: Sat, 2 Feb 2019 02:29:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=B2=BE=E4=BF=AE=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aio/content/guide/ajs-quick-reference.md | 10 +++--- aio/content/guide/animations.md | 2 +- aio/content/guide/aot-compiler.md | 4 +-- aio/content/guide/architecture-components.md | 2 +- aio/content/guide/attribute-directives.md | 6 ++-- aio/content/guide/build.md | 6 ++-- aio/content/guide/change-log.md | 2 +- aio/content/guide/cheatsheet.md | 4 +-- aio/content/guide/comparing-observables.md | 2 +- aio/content/guide/component-interaction.md | 8 ++--- aio/content/guide/component-styles.md | 8 ++--- .../guide/dependency-injection-in-action.md | 10 +++--- .../guide/dependency-injection-providers.md | 4 +-- aio/content/guide/dependency-injection.md | 4 +-- aio/content/guide/dynamic-form.md | 2 +- aio/content/guide/form-validation.md | 4 +-- aio/content/guide/forms-overview.md | 12 ++++--- aio/content/guide/forms.md | 8 ++--- aio/content/guide/frequent-ngmodules.md | 2 +- aio/content/guide/glossary.md | 6 ++-- .../hierarchical-dependency-injection.md | 8 ++--- aio/content/guide/http.md | 14 ++++---- aio/content/guide/i18n.md | 2 +- aio/content/guide/lifecycle-hooks.md | 10 +++--- aio/content/guide/ngmodule-api.md | 4 +-- aio/content/guide/ngmodule-faq.md | 8 ++--- aio/content/guide/npm-packages.md | 8 ++--- aio/content/guide/pipes.md | 4 +-- aio/content/guide/quickstart.md | 2 +- aio/content/guide/releases.md | 2 +- aio/content/guide/router.md | 6 ++-- aio/content/guide/rx-library.md | 2 +- aio/content/guide/security.md | 6 ++-- .../guide/service-worker-communications.md | 4 +-- aio/content/guide/service-worker-devops.md | 2 +- .../guide/service-worker-getting-started.md | 2 +- aio/content/guide/singleton-services.md | 2 +- aio/content/guide/structural-directives.md | 2 +- aio/content/guide/styleguide.md | 14 ++++---- aio/content/guide/template-syntax.md | 14 ++++---- aio/content/guide/testing.md | 36 +++++++++---------- aio/content/guide/transition-and-triggers.md | 4 +-- aio/content/guide/universal.md | 4 +-- aio/content/guide/upgrade.md | 2 +- aio/content/guide/visual-studio-2015.md | 4 +-- 45 files changed, 137 insertions(+), 135 deletions(-) diff --git a/aio/content/guide/ajs-quick-reference.md b/aio/content/guide/ajs-quick-reference.md index 12ec26ee83..f1ee38da5d 100644 --- a/aio/content/guide/ajs-quick-reference.md +++ b/aio/content/guide/ajs-quick-reference.md @@ -777,7 +777,7 @@ AngularJS 为模板提供了七十多个内置指令。 For more information on property binding, see the [Property binding](guide/template-syntax#property-binding) section of the [Template Syntax](guide/template-syntax) page. - 要了解属性绑定的更多知识,参见[模板语法](guide/template-syntax)中的[属性绑定](guide/template-syntax#property-binding)部分。 + 要了解关于属性绑定的更多知识,参见[模板语法](guide/template-syntax)中的[属性绑定](guide/template-syntax#property-binding)部分。 @@ -828,7 +828,7 @@ AngularJS 为模板提供了七十多个内置指令。 For more information on style binding, see the [Style binding](guide/template-syntax#style-binding) section of the [Template Syntax](guide/template-syntax) page. - 要了解样式绑定的更多知识,参见[模板语法](guide/template-syntax)中的[样式绑定](guide/template-syntax#style-binding)部分。 + 要了解关于样式绑定的更多知识,参见[模板语法](guide/template-syntax)中的[样式绑定](guide/template-syntax#style-binding)部分。 For more information on the `ngStyle` directive, see [NgStyle](guide/template-syntax#ngStyle) section of the [Template Syntax](guide/template-syntax) page. @@ -1028,7 +1028,7 @@ AngularJS 中的很多内置过滤器在 Angular 中都有对应的管道。 Selects a subset of items from the defined collection, based on the filter criteria. - 基于过滤条件从指定的集合中选取出一个子集。 + 根据过滤条件从指定的集合中选取出一个子集。 @@ -1227,7 +1227,7 @@ AngularJS 中的很多内置过滤器在 Angular 中都有对应的管道。 In both AngularJS and Angular, modules help you organize your application into cohesive blocks of functionality. -无论在 AngularJS 还是 Angular 中,你都要借助“模块”来把应用拆分成一些紧密相关的功能块。 +无论在 AngularJS 还是 Angular 中,“模块”都会帮你把应用拆分成一些内聚的功能块。 In AngularJS, you write the code that provides the model and the methods for the view in a **controller**. In Angular, you build a **component**. @@ -1593,7 +1593,7 @@ also encapsulate a style sheet within a specific component. This allows you to set appropriate styles for individual components that won’t leak into other parts of the application. - 这让你可以为各个组件设置合适的样式,而不用担心它被泄漏到程序中的其它部分。 + 这让你可以为各个组件设置合适的样式,而不用担心它泄漏到程序中的其它部分。 diff --git a/aio/content/guide/animations.md b/aio/content/guide/animations.md index 8e0d96f4a8..eaee6a92c7 100644 --- a/aio/content/guide/animations.md +++ b/aio/content/guide/animations.md @@ -269,7 +269,7 @@ region="transition2"> * Use `state()` to define styles that are applied at the end of each transition, they persist after the animation has completed. - 请用 `state()` 来定义那些在每个转场结束时样式,这些样式在动画结束时会保留。 + 请用 `state()` 来定义那些每个转场结束时的样式,这些样式在动画完成后仍会保留。 * Use `transition()` to define intermediate styles, which create the illusion of motion during the animation. diff --git a/aio/content/guide/aot-compiler.md b/aio/content/guide/aot-compiler.md index 0bd0ddd81a..56793a6826 100644 --- a/aio/content/guide/aot-compiler.md +++ b/aio/content/guide/aot-compiler.md @@ -13,7 +13,7 @@ The Angular Ahead-of-Time (AOT) compiler converts your Angular HTML and TypeScri This guide explains how to specify metadata and apply available compiler options to compile your applications efficiently using the AOT compiler. -本指南中解释了如何指定元数据,并通过一些编译器选项来借助 AOT 编译器来更有效的编译应用。 +本指南中解释了如何指定元数据,并使用一些编译器选项以借助 AOT 编译器来更有效的编译应用。
@@ -54,7 +54,7 @@ JIT compilation is the default when you run the [`ng build`](cli/build) (build o For AOT compilation, include the `--aot` option with the `ng build` or `ng serve` command: -要进行 AOT 编译只要给 `ng build` 或 `ng serve` 命令添加 `--aot` 标志就行了: +要进行 AOT 编译,只要让 `ng build` 或 `ng serve` 命令中包含 `--aot` 标志就行了: ng build --aot diff --git a/aio/content/guide/architecture-components.md b/aio/content/guide/architecture-components.md index 7b4b013f97..a581e1c5da 100644 --- a/aio/content/guide/architecture-components.md +++ b/aio/content/guide/architecture-components.md @@ -302,7 +302,7 @@ The example template uses two built-in structural directives to add application * [`*ngFor`](guide/displaying-data#ngFor) is an iterative; it tells Angular to stamp out one `
  • ` per hero in the `heroes` list. - [`*ngFor`](guide/displaying-data#ngFor) 是一个迭代器,它要求 Angular 为 `heroes` 列表中的每个 `
  • ` 渲染出一个 `
  • `。 + [`*ngFor`](guide/displaying-data#ngFor) 是一个迭代器,它要求 Angular 为 `heroes` 列表中的每个英雄渲染出一个 `
  • `。 * [`*ngIf`](guide/displaying-data#ngIf) is a conditional; it includes the `HeroDetail` component only if a selected hero exists. diff --git a/aio/content/guide/attribute-directives.md b/aio/content/guide/attribute-directives.md index a11b29fe69..cce34bebca 100644 --- a/aio/content/guide/attribute-directives.md +++ b/aio/content/guide/attribute-directives.md @@ -237,7 +237,7 @@ each adorned by the `HostListener` decorator. The `@HostListener` decorator lets you subscribe to events of the DOM element that hosts an attribute directive, the `

    ` in this case. -`@HostListener` 装饰器引用属性型指令的宿主元素,在这个例子中就是 `

    `。 +`@HostListener` 装饰器让你订阅某个属性型指令所在的宿主 DOM 元素的事件,在这个例子中就是 `

    `。

    @@ -282,7 +282,7 @@ Here's the updated directive in full: Run the app and confirm that the background color appears when the mouse hovers over the `p` and disappears as it moves out. -运行本应用并确认:当把鼠标移到 `p` 上的时候,背景色就出现了,而移开的时候,它消失了。 +运行本应用并确认:当把鼠标移到 `p` 上的时候,背景色就出现了,而移开时就消失了。
    Second Highlight @@ -383,7 +383,7 @@ Fortunately you can name the directive property whatever you want _and_ **_alias Restore the original property name and specify the selector as the alias in the argument to `@Input`. -恢复原始属性名,并在 `@Input` 的参数中把选择器 `myHighlight` 指定为别名。 +恢复原始属性名,并在 `@Input` 的参数中把该选择器指定为别名。 diff --git a/aio/content/guide/build.md b/aio/content/guide/build.md index 3e836189c4..e5ded3f11c 100644 --- a/aio/content/guide/build.md +++ b/aio/content/guide/build.md @@ -4,7 +4,7 @@ This page discusses build-specific configuration options for Angular projects. -本文讨论的是 Angular 应用中与构建相关的配置项。 +本文讨论的是 Angular 项目中与构建有关的配置项。 {@a app-environments} @@ -398,7 +398,7 @@ Each budget entry is a JSON object with the following properties: Warns when the size ??reaches or exceeds?? this threshold percentage of the baseline. - 当大小小于或超过基线的这个阈值百分比时都给出警告。 + 当大小达到或小于基线的这个阈值百分比时都给出警告。 @@ -408,7 +408,7 @@ Each budget entry is a JSON object with the following properties: Reports an error when the size ??reaches or exceeds?? this threshold percentage of the baseline. - 当大小小于或超过基线的这个阈值百分比时都报错。 + 当大小达到或小于基线的这个阈值百分比时都报错。 diff --git a/aio/content/guide/change-log.md b/aio/content/guide/change-log.md index e4333a17fc..19329a3d46 100644 --- a/aio/content/guide/change-log.md +++ b/aio/content/guide/change-log.md @@ -422,7 +422,7 @@ Added the `moduleId: module.id` property-and-value to their `@Component` metadat This change is a requirement for compilation with AOT compiler when the app loads modules with SystemJS as the samples currently do. -当应用像例子当前使用的方法一样 - 使用 SystemJS 加载模块时,本更新是 AOT 编译器的前提条件。 +当应用像这个例子一样使用 SystemJS 方式加载模块时,这种修改是进行 AOT 编译器的前提。 ## "Lifecycle Hooks" guide simplified (2016-09-24) diff --git a/aio/content/guide/cheatsheet.md b/aio/content/guide/cheatsheet.md index 55e8a32d1b..44c88ea671 100644 --- a/aio/content/guide/cheatsheet.md +++ b/aio/content/guide/cheatsheet.md @@ -358,7 +358,7 @@ is available to declarations of this module.

    Transforms the current value of expression cardNumber via the pipe called myCardNumberFormatter.

    -

    使用名叫myCardNumberFormatter的管道对表达式cardNumber的当前值进行变幻

    +

    使用名叫myCardNumberFormatter的管道对表达式cardNumber的当前值进行转换。

    @@ -476,7 +476,7 @@ is available to declarations of this module.

    Conditionally swaps the contents of the div by selecting one of the embedded templates based on the current value of conditionExpression.

    -

    根据conditionExpression的当前值选择一个嵌入式模板,并用它替换这个 div 的内容。

    +

    根据conditionExpression的当前值选择一个嵌入式模板,并据此决定是否替换掉这个 div 的内容。

    diff --git a/aio/content/guide/comparing-observables.md b/aio/content/guide/comparing-observables.md index 2b42391540..5b4a63bd48 100644 --- a/aio/content/guide/comparing-observables.md +++ b/aio/content/guide/comparing-observables.md @@ -104,7 +104,7 @@ sub.unsubscribe(); * Observable execution errors are delivered to the subscriber's error handler, and the subscriber automatically unsubscribes from the observable. - 可观察对象的错误处理是交给订阅者的错误处理器的,并且该订阅者会自动取消对这个可观察对象的订阅。 + 可观察对象的错误处理工作交给了订阅者的错误处理器,并且该订阅者会自动取消对这个可观察对象的订阅。 obs.subscribe(() => { diff --git a/aio/content/guide/component-interaction.md b/aio/content/guide/component-interaction.md index 649d87b918..6a56c704b2 100644 --- a/aio/content/guide/component-interaction.md +++ b/aio/content/guide/component-interaction.md @@ -86,7 +86,7 @@ The running application displays three heroes: E2E test that all children were instantiated and displayed as expected: -端到端测试,用于确保所有的子组件都像所期待的那样被初始化并显示出来。 +端到端测试,用于确保所有的子组件都如预期般初始化并显示出来: @@ -243,7 +243,7 @@ payload `$event` and updates a counter. The framework passes the event argument—represented by `$event`—to the handler method, and the method processes it: -本框架把事件参数(用 `$event` 表示)传给事件处理方法,这个方法会处理: +本框架把事件参数(用 `$event` 表示)传给事件处理方法,该方法会处理它:
    Child-to-parent @@ -394,7 +394,7 @@ It takes a bit more work to get the child view into the parent component *class* First, you have to import references to the `ViewChild` decorator and the `AfterViewInit` lifecycle hook. -首先,你要使用 `ViewChild` 装饰器导入这个引用,并挂上 `AfterViewInit` 生命周期钩子。 +首先,你必须导入对装饰器 `ViewChild` 以及生命周期钩子 `AfterViewInit` 的引用。 Next, inject the child `CountdownTimerComponent` into the private `timerComponent` property via the `@ViewChild` property decoration. @@ -450,7 +450,7 @@ Use [the same countdown timer tests](guide/component-interaction#countdown-tests A parent component and its children share a service whose interface enables bi-directional communication *within the family*. -父组件和它的子组件共享同一个服务,利用该服务*在家庭内部*实现双向通讯。 +父组件和它的子组件共享同一个服务,利用该服务*在组件家族内部*实现双向通讯。 The scope of the service instance is the parent component and its children. Components outside this component subtree have no access to the service or their communications. diff --git a/aio/content/guide/component-styles.md b/aio/content/guide/component-styles.md index cd4a382d03..85c9df1e09 100644 --- a/aio/content/guide/component-styles.md +++ b/aio/content/guide/component-styles.md @@ -76,7 +76,7 @@ This scoping restriction is a ***styling modularity feature***. * Class names and selectors are local to the component and don't collide with classes and selectors used elsewhere in the application. - 类名和选择器是仅属于组件内部的,它不会和应用中其它地方的类名和选择器出现冲突。 + 类名和选择器是局限于该组件的,它不会和应用中其它地方的类名和选择器冲突。 * Changes to styles elsewhere in the application don't affect the component's styles. @@ -90,7 +90,7 @@ This scoping restriction is a ***styling modularity feature***. * You can change or remove component CSS code without searching through the whole application to find where else the code is used. - 将来你可以修改或移除组件的 CSS 代码,而不用遍历整个应用来看它有没有被别处用到,只要看看当前组件就可以了。 + 将来你可以修改或移除组件的 CSS 代码,而不用遍历整个应用来看它有没有在别处用到。 {@a special-selectors} @@ -316,7 +316,7 @@ ng generate component hero-app You can embed CSS styles directly into the HTML template by putting them inside `