From a4ac40b64082233384f9a51866ddc2486e819f6f Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Sat, 24 Mar 2018 11:16:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BF=BB=E8=AF=91=E4=BA=86=E6=89=80?= =?UTF-8?q?=E6=9C=89=E9=81=97=E6=BC=8F=E7=9A=84=E9=83=A8=E5=88=86=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aio/content/guide/aot-compiler.md | 2 ++ aio/content/guide/architecture.md | 7 +++---- aio/content/guide/browser-support.md | 2 ++ aio/content/guide/comparing-observables.md | 8 ++++++++ aio/content/guide/glossary.md | 13 +++++++++++-- aio/content/guide/lifecycle-hooks.md | 4 ++++ aio/content/guide/module-types.md | 2 ++ aio/content/guide/ngmodule-api.md | 3 ++- aio/content/guide/npm-packages.md | 4 ++-- aio/content/guide/router.md | 8 ++++---- aio/content/guide/rx-library.md | 16 ++++++++-------- aio/content/guide/setup.md | 6 ++---- aio/content/guide/singleton-services.md | 2 ++ aio/content/guide/structural-directives.md | 4 ++++ aio/content/guide/template-syntax.md | 2 ++ aio/content/guide/testing.md | 6 +++++- aio/content/guide/upgrade.md | 2 ++ 17 files changed, 65 insertions(+), 26 deletions(-) diff --git a/aio/content/guide/aot-compiler.md b/aio/content/guide/aot-compiler.md index 684a2f0a70..9b59395130 100644 --- a/aio/content/guide/aot-compiler.md +++ b/aio/content/guide/aot-compiler.md @@ -1598,6 +1598,8 @@ provider: [{ provide: Foo, useValue: { 0: 'test' } }] Change the name of the property to something non-numeric. +把该属性的名字改为非数字类型。 + ``` // CORRECTED diff --git a/aio/content/guide/architecture.md b/aio/content/guide/architecture.md index 75639f8fdc..9fd5d715e2 100644 --- a/aio/content/guide/architecture.md +++ b/aio/content/guide/architecture.md @@ -892,15 +892,14 @@ by implementing the lifecycle hook interfaces. > [**Pipes**](guide/pipes): Use pipes in your templates to improve the user experience by transforming values for display. Consider this `currency` pipe expression: > -> > `price | currency:'USD':true` -> -> It displays a price of 42.33 as `$42.33`. - > [**管道**](guide/pipes):在模板中使用管道转换成用于显示的值,以增强用户体验。例如,`currency` 管道表达式: > > > `price | currency:'USD':true` > +> It displays a price of 42.33 as `$42.33`. +> > 它把价格“42.33”显示为 `$42.33`。 +> > [**Router**](guide/router): Navigate from page to page within the client application and never leave the browser. diff --git a/aio/content/guide/browser-support.md b/aio/content/guide/browser-support.md index 5711353015..c430d623b2 100644 --- a/aio/content/guide/browser-support.md +++ b/aio/content/guide/browser-support.md @@ -323,6 +323,8 @@ These are the polyfills required to run an Angular application on each supported [ES7/reflect](guide/browser-support#core-es7-reflect) (JIT only) + [ES7/reflect](guide/browser-support#core-es7-reflect) (仅 JIT) + diff --git a/aio/content/guide/comparing-observables.md b/aio/content/guide/comparing-observables.md index 9df6b68c3e..4004431bdb 100644 --- a/aio/content/guide/comparing-observables.md +++ b/aio/content/guide/comparing-observables.md @@ -270,6 +270,8 @@ The following code snippets illustrate how the same kind of operation is defined Implied by promise resolution. + 承诺被解析时隐式完成。 + @@ -393,6 +395,9 @@ button.removeEventListener(‘click’, handler); Listen for keystrokes, but provide a stream representing the value in the input. + + 监听按键,提供一个流来表示这些输入的值。 +
fromEvent(inputEl, 'keydown').pipe(
   map(e => e.target.value)
 );
@@ -402,6 +407,9 @@ button.removeEventListener(‘click’, handler); Does not support configuration. + + 不支持配置。 +
element.addEventListener(eventName, (event) => {
   // Cannot change the passed Event into another
   // value before it gets to the handler
diff --git a/aio/content/guide/glossary.md b/aio/content/guide/glossary.md
index 9cd4f0fbe4..871ab68572 100644
--- a/aio/content/guide/glossary.md
+++ b/aio/content/guide/glossary.md
@@ -199,8 +199,12 @@ Angular 文档中提到“驼峰式命名法 (camelCase) ”的时候,所指
 
 The Angular CLI is a `command line interface` tool that can create a project, add files, and perform a variety of ongoing development tasks such as testing, bundling, and deployment.
 
+Angular CLI 是个命令行接口(Command Line Interface)工具,它可以创建项目、添加文件以及执行各种正在进行的开发任务,比如测试、打包和部署。
+
 Learn more in the [Getting Started](guide/quickstart) guide.
 
+要了解更多,参见[快速起步](guide/quickstart)。
+
 {@a component}
 
 ## Component
@@ -782,17 +786,22 @@ You rarely access Angular feature modules directly. You usually import them from
 
 ## NgModule
 
-## 可观察对象 (observable)
-
 Helps you organize an application into cohesive blocks of functionality.
 An NgModule identifies the components, directives, and pipes that the application uses along with the list of external NgModules that the application needs, such as `FormsModule`.
 
+帮助你把应用组织成多个内聚的功能块。
+NgModule 表示应用的组件、指令和管道以及所用到的外部模块的列表,比如 `FormsModule`。
+
 Every Angular application has an application root-module class. By convention, the class is
 called `AppModule` and resides in a file named `app.module.ts`.
 
+每个 Angular 应用都有一个应用级根模块类。这类通常叫做 `AppModule`,并且位于一个名叫 `app.module.ts` 的文件中。
+
 For details and examples, see [NgModules](guide/ngmodules) and the 
 related files in that section.
 
+要获得详情和范例,参见 [NgModule](guide/ngmodules) 及其相关文件。
+
 {@a O}
 
 ## Observable
diff --git a/aio/content/guide/lifecycle-hooks.md b/aio/content/guide/lifecycle-hooks.md
index 296606a2f1..1e7ce479d9 100644
--- a/aio/content/guide/lifecycle-hooks.md
+++ b/aio/content/guide/lifecycle-hooks.md
@@ -69,12 +69,16 @@ calls the lifecycle hook methods in the following sequence at specific moments:
 
         Hook
 
+        钩子
+
     
 
     
 
         Purpose and Timing
 
+        用途及时机
+
     
 
   
diff --git a/aio/content/guide/module-types.md b/aio/content/guide/module-types.md
index 742f0888fb..862aadb468 100644
--- a/aio/content/guide/module-types.md
+++ b/aio/content/guide/module-types.md
@@ -1,5 +1,7 @@
 # Types of Feature Modules
 
+# 特性模块的分类
+
 #### Prerequisites
 
 #### 前提条件
diff --git a/aio/content/guide/ngmodule-api.md b/aio/content/guide/ngmodule-api.md
index 10162bcba7..6a74e0b8ac 100644
--- a/aio/content/guide/ngmodule-api.md
+++ b/aio/content/guide/ngmodule-api.md
@@ -115,8 +115,9 @@ The following table summarizes the `@NgModule` metadata properties.
         
 
         
  • + The template is compiled within the context of an NgModule—the NgModule within which the template's component is declared—which determines the set of selectors using the following rules: - + 该模板在 NgModule 环境中编译 —— 模板的组件是在该 NgModule 内部声明的,它会使用如下规则来确定这组选择器:
      diff --git a/aio/content/guide/npm-packages.md b/aio/content/guide/npm-packages.md index 7239c01ce3..5b61f488e8 100644 --- a/aio/content/guide/npm-packages.md +++ b/aio/content/guide/npm-packages.md @@ -80,7 +80,7 @@ The *devDependencies* are only necessary to *develop* the application. {@a dependencies} -## *Dependencies* +## *dependencies* The `dependencies` section of `package.json` contains: @@ -193,7 +193,7 @@ which polyfills missing features for several popular browser. {@a dev-dependencies} -## *DevDependencies* +## *devDependencies* The packages listed in the *devDependencies* section of the `package.json` help you develop the application on your local machine. diff --git a/aio/content/guide/router.md b/aio/content/guide/router.md index 852ae421ea..97df7dce7d 100644 --- a/aio/content/guide/router.md +++ b/aio/content/guide/router.md @@ -401,6 +401,8 @@ It has a great deal of useful information including: An `Observable` of the URL [fragment](#fragment) available to all routes. + 一个适用于所有路由的 URL 的 [fragment(片段)](#fragment)的 `Observable`。 + @@ -2371,11 +2373,9 @@ pattern and go to the same "Magneta" detail view.
      -
      +
      Route parameter: Required or optional?
      - Route parameter: Required or optional? - -
      +
      路由参数:必须的还是可选的?
      Embedding the route parameter token, `:id`, in the route definition path is a good choice for this scenario diff --git a/aio/content/guide/rx-library.md b/aio/content/guide/rx-library.md index 04499f86d6..79c12d054e 100644 --- a/aio/content/guide/rx-library.md +++ b/aio/content/guide/rx-library.md @@ -97,14 +97,14 @@ RxJS 提供了很多操作符(超过 150 个),不过只有少数是常用
      -| 类别 | 操作 | -| :------------| :----------| -| 创建 | `from`, `fromPromise`,`fromEvent`, `of` | -| 组合 | `combineLatest`, `concat`, `merge`, `startWith` , `withLatestFrom`, `zip` | -| 过滤 | `debounceTime`, `distinctUntilChanged`, `filter`, `take`, `takeUntil` | -| 转换 | `bufferTime`, `concatMap`, `map`, `mergeMap`, `scan`, `switchMap` | -| 工具 | `tap` | -| 多播 | `share` | +| Area类别 | Operators操作 | +| :------------ | :---------- | +| Creation创建 | `from`, `fromPromise`,`fromEvent`, `of` | +| Combination组合 | `combineLatest`, `concat`, `merge`, `startWith` , `withLatestFrom`, `zip` | +| Filtering过滤 | `debounceTime`, `distinctUntilChanged`, `filter`, `take`, `takeUntil` | +| Transformation转换 | `bufferTime`, `concatMap`, `map`, `mergeMap`, `scan`, `switchMap` | +| Utility工具 | `tap` | +| Multicasting多播 | `share` | ## Error handling diff --git a/aio/content/guide/setup.md b/aio/content/guide/setup.md index dcb80c2e36..29f5cfbd75 100644 --- a/aio/content/guide/setup.md +++ b/aio/content/guide/setup.md @@ -352,11 +352,9 @@ Node.js 和 npm 对使用 Angular 和其他平台进行现代网络开发是至 Node 驱动客户端开发和构建工具。 *npm* 包管理器本身是 *node* 应用,用于安装 JavaScript 库。 - -Get them now if they're not already installed on your machine. +Get them now if they're not already installed on your machine. -如果你的电脑没有安装它们, -立刻安装它们。 +如果你的电脑没有安装它们,请现在安装。 **Verify that you are running node `v4.x.x` or higher and npm `3.x.x` or higher** by running the commands `node -v` and `npm -v` in a terminal/console window. diff --git a/aio/content/guide/singleton-services.md b/aio/content/guide/singleton-services.md index 0b7a0097bb..39a1fc8e3f 100644 --- a/aio/content/guide/singleton-services.md +++ b/aio/content/guide/singleton-services.md @@ -1,5 +1,7 @@ # Singleton services +# 单例应用 + #### Prerequisites: #### 前提条件: diff --git a/aio/content/guide/structural-directives.md b/aio/content/guide/structural-directives.md index ff8883668b..2c4857d30f 100644 --- a/aio/content/guide/structural-directives.md +++ b/aio/content/guide/structural-directives.md @@ -371,6 +371,10 @@ Its intended source is implicit. Angular sets `let-hero` to the value of the context's `$implicit` property which `NgFor` has initialized with the hero for the current iteration. + 这里并没有指定 `let-hero` 的上下文属性。它的来源是隐式的。 + Angular 将 `let-hero` 设置为此上下文中 `$implicit` 属性的值, + 它是由 `NgFor` 用当前迭代中的英雄初始化的。 + * The [API guide](api/common/NgForOf "API: NgFor") describes additional `NgFor` directive properties and context properties. diff --git a/aio/content/guide/template-syntax.md b/aio/content/guide/template-syntax.md index ea4c4bf6d7..25a89485f6 100644 --- a/aio/content/guide/template-syntax.md +++ b/aio/content/guide/template-syntax.md @@ -552,6 +552,8 @@ from the _source-to-view_, from _view-to-source_, and in the two-way sequence: _ One-way
      from data source
      to view target + + 单向
      从数据源
      到视图 diff --git a/aio/content/guide/testing.md b/aio/content/guide/testing.md index 2e7d775acb..1804602a36 100644 --- a/aio/content/guide/testing.md +++ b/aio/content/guide/testing.md @@ -2150,6 +2150,8 @@ to the looping value and listens for the component's `selected` event. Here's the component's full definition: +下面是该组件的完整定义: + {@a dashboard-hero-component} The immediate goal is to test the `DashboardHeroComponent`, not the `DashboardComponent`, @@ -4579,7 +4583,7 @@ Here are the most important static methods, in order of likely utility. - A few of the `TestBed` instance methods are not covered by static `TestBed` _class_ methods. These are rarely needed. diff --git a/aio/content/guide/upgrade.md b/aio/content/guide/upgrade.md index cbd65df7ec..076f9bc6fe 100644 --- a/aio/content/guide/upgrade.md +++ b/aio/content/guide/upgrade.md @@ -1269,6 +1269,8 @@ compilation can pick it up. You can then inject it in Angular using its class as a type annotation: +然后你就可以使用它的类作为类型注解将其在 Angular 中进行注入了: +