From b7ceb9e2113c4c3655db12cb0fb360bcff9830cd Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Wed, 7 Mar 2018 16:48:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=E4=BA=86=E6=AD=BB?= =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aio/content/guide/ajs-quick-reference.md | 2 +- aio/content/guide/architecture.md | 4 ++-- aio/content/guide/attribute-directives.md | 2 +- aio/content/guide/change-log.md | 9 ++++++--- aio/content/guide/dependency-injection-in-action.md | 2 +- aio/content/guide/glossary.md | 2 +- aio/content/guide/http.md | 3 ++- aio/content/guide/i18n.md | 12 +++--------- aio/content/guide/ngmodule-faq.md | 2 +- aio/content/guide/router.md | 10 +++++----- aio/content/guide/setup.md | 2 +- aio/content/guide/testing.md | 1 + aio/content/guide/ts-to-js.md | 0 aio/content/guide/upgrade.md | 2 +- aio/content/tutorial/toh-pt1.md | 1 + aio/content/tutorial/toh-pt6.md | 2 ++ aio/yarn.lock | 4 ++++ 17 files changed, 33 insertions(+), 27 deletions(-) delete mode 100644 aio/content/guide/ts-to-js.md diff --git a/aio/content/guide/ajs-quick-reference.md b/aio/content/guide/ajs-quick-reference.md index 78c0b097d5..1d6657727e 100644 --- a/aio/content/guide/ajs-quick-reference.md +++ b/aio/content/guide/ajs-quick-reference.md @@ -1397,7 +1397,7 @@ The Angular code is shown using TypeScript. For more information on modules, see [NgModules](guide/ngmodules). - 要了解关于模块的更多知识,参见[NgModules](guide/ngmodule)。 + 要了解关于模块的更多知识,参见[NgModules](guide/ngmodules)。 diff --git a/aio/content/guide/architecture.md b/aio/content/guide/architecture.md index 4820a80af3..118856b887 100644 --- a/aio/content/guide/architecture.md +++ b/aio/content/guide/architecture.md @@ -57,7 +57,7 @@ NgModules are a big deal. This page introduces modules; the [NgModules](guide/ngmodules) pages relating to NgModules covers them in detail. -NgModules 很重要。这里只是简单介绍,在 [NgModules](guide/ngmodule)中会做深入讲解。 +NgModules 很重要。这里只是简单介绍,在 [NgModules](guide/ngmodules)中会做深入讲解。
@@ -229,7 +229,7 @@ Hang in there. The confusion yields to clarity with time and experience. Learn more from the [NgModules](guide/ngmodules) page. - 更多信息,参见 [NgModules](guide/ngmodule)。 + 更多信息,参见 [NgModules](guide/ngmodules)。 diff --git a/aio/content/guide/attribute-directives.md b/aio/content/guide/attribute-directives.md index 4117e77612..8e63d004b9 100644 --- a/aio/content/guide/attribute-directives.md +++ b/aio/content/guide/attribute-directives.md @@ -96,7 +96,7 @@ CLI 会创建`src/app/highlight.directive.ts`及相应的测试文件(`.../spe _Directives_ must be declared in [Angular Modules](guide/ngmodules) in the same manner as _components_. -和**组件**一样,这些**指令**也必须在[Angular模块](guide/ngmodule)中进行声明。 +和**组件**一样,这些**指令**也必须在[Angular模块](guide/ngmodules)中进行声明。 diff --git a/aio/content/guide/change-log.md b/aio/content/guide/change-log.md index 02c843f8cc..9fa54426af 100644 --- a/aio/content/guide/change-log.md +++ b/aio/content/guide/change-log.md @@ -181,7 +181,7 @@ Added two plunkers that each test _one simple component_ so you can write a comp Linked to these plunkers in "Testing" and "Setup anatomy" guides. 添加了两个plunker例子,每个都测试一个简单的组件,以便你可以自己在plunker中写组件测试:一个用于测试快速起步中的`AppComponent`,另一个用于测试“测试”章节的`BannerComponent`。 -并在[测试](guide/testing#live-examples)和[环境设置剖析](guide/setup-systemjs-anatomy)中链接到它们。 +并在“测试”和“环境设置剖析”中链接到它们。 ## Internationalization: pluralization and _select_ (2016-11-30) @@ -252,12 +252,15 @@ The updated TypeScript to JavaScript guide explains how to write apps in ES6/7 by translating the common idioms in the TypeScript documentation examples (and elsewhere on the web) to ES6/7 and ES5. -更新了“[从TypeScript到JavaScript](guide/ts-to-js)”烹饪宝典,解释如何使用ES6/7编写应用。 +更新了“从TypeScript到JavaScript”,以解释如何使用ES6/7编写应用。 将TypeScript文档示例中(以及网站其它地方)的习惯用法翻译成ES6/7和ES5。 This was [removed in August 2017](https://github.com/angular/angular/pull/18694) but can still be viewed in the [v2 documentation](https://v2.angular.io/docs/ts/latest/cookbook/ts-to-js.html). +本章已经 [于2017年8月移除](https://github.com/angular/angular/pull/18694), +不过仍然可以在[第二版的文档中](https://v2.angular.io/docs/ts/latest/cookbook/ts-to-js.html)看到。 + ## Sync with Angular v.2.1.1 (2016-10-21) ## 与Angular v.2.1.1 同步(2016-10-21) @@ -362,7 +365,7 @@ All guided samples with routing use the _Routing Module_ and prose content has b most conspicuously in the [NgModule](guide/ngmodules) guide and [NgModule FAQ](guide/ngmodule-faq) guide. -所有使用路由的例子都使用**路由模块**,相关内容也被更新。更新最多的是[Angular模块(NgModule)](guide/ngmodule)章和[Angular模块常见问题](guide/ngmodule-faq)烹饪书。 +所有使用路由的例子都使用**路由模块**,相关内容也被更新。更新最多的是[Angular模块(NgModule)](guide/ngmodules)章和[Angular模块常见问题](guide/ngmodule-faq)烹饪书。 ## New "Internationalization" guide (2016-09-30) diff --git a/aio/content/guide/dependency-injection-in-action.md b/aio/content/guide/dependency-injection-in-action.md index 092c29145b..be3331eb39 100644 --- a/aio/content/guide/dependency-injection-in-action.md +++ b/aio/content/guide/dependency-injection-in-action.md @@ -49,7 +49,7 @@ guide. *提供商*是用来新建或者交付服务的。 Angular拿到“类提供商”之后,会通过`new`操作来新建服务实例。 -从[依赖注入](guide/dependency-injection#injector-providers)一章可以学到关于提供商的更多知识。 +从[依赖注入](guide/dependency-injection#register-providers-ngmodule)一章可以学到关于提供商的更多知识。 diff --git a/aio/content/guide/glossary.md b/aio/content/guide/glossary.md index 36ca6192cf..3ff3068bab 100644 --- a/aio/content/guide/glossary.md +++ b/aio/content/guide/glossary.md @@ -722,7 +722,7 @@ Angular有下列模块类型: * [NgModules](guide/glossary#ngmodule). For details and examples, see the [NgModules](guide/ngmodules) page. - [Angular 模块](guide/glossary#ngmodule),见[Angular 模块](guide/ngmodule)。 + [Angular 模块](guide/glossary#ngmodule),见[Angular 模块](guide/ngmodules)。 * ES2015 modules, as described in this section. diff --git a/aio/content/guide/http.md b/aio/content/guide/http.md index 33ce583ac3..962c54bf0a 100644 --- a/aio/content/guide/http.md +++ b/aio/content/guide/http.md @@ -618,7 +618,8 @@ for each `HttpClient` method call. To implement an interceptor, declare a class that implements the `intercept()` method of the `HttpInterceptor` interface. - Here is a do-nothing _noop_ interceptor that simply passes the request through without touching it: +Here is a do-nothing _noop_ interceptor that simply passes the request through without touching it: + ` section: -> - - +> > This XML element represents the translation of the `

` greeting tag that you marked with the `i18n` attribute earlier in this guide. @@ -721,15 +719,11 @@ This sample file is easy to translate without a special editor or knowledge of F and context provided by the source, description, and meaning elements to guide your selection of the appropriate French translation. -> - - +> 3. Translate the other text nodes the same way: -> - - +>
diff --git a/aio/content/guide/ngmodule-faq.md b/aio/content/guide/ngmodule-faq.md index b5bfd063f8..2958b9427f 100644 --- a/aio/content/guide/ngmodule-faq.md +++ b/aio/content/guide/ngmodule-faq.md @@ -973,7 +973,7 @@ most of them exported. The `SharedModule` may re-export other widget modules, such as `CommonModule`, `FormsModule`, and NgModules with the UI controls that you use most widely. -`SharedModule`可以重新导出其它[小部件模块](guide/ngmodule-faq#widget-feature-module),比如`CommonModule`、`FormsModule`和提供你广泛使用的UI控件的那些模块。 +`SharedModule`可以重新导出其它小部件模块,比如`CommonModule`、`FormsModule`和提供你广泛使用的UI控件的那些模块。 The `SharedModule` should not have `providers` for reasons [explained previously](guide/ngmodule-faq#q-why-bad). Nor should any of its imported or re-exported modules have `providers`. diff --git a/aio/content/guide/router.md b/aio/content/guide/router.md index 436b0887c6..bdde6b89ce 100644 --- a/aio/content/guide/router.md +++ b/aio/content/guide/router.md @@ -1307,7 +1307,7 @@ and create a **[Routing Module](#routing-module)**, a special type of `Service M of routing in feature modules. 作为简单的路由配置,将添加配置好的`RouterModule`到`AppModule`中就足够了。 -随着应用的成长,我们将需要将路由配置重构到单独的文件,并创建**[路由模块](guide/router#routing-module)** - 一种特别的、专门为特性模块的路由器服务的**服务模块**。 +随着应用的成长,我们将需要将路由配置重构到单独的文件,并创建**[路由模块](#routing-module)** - 一种特别的、专门为特性模块的路由器服务的**服务模块**。
@@ -1823,19 +1823,19 @@ The **Routing Module** has several characteristics: * Separates routing concerns from other application concerns. - 把路由这个关注点从其它应用类关注点中分离出去 + 把路由这个关注点从其它应用类关注点中分离出去。 * Provides a module to replace or remove when testing the application. - 测试特性模块时,可以替换或移除路由模块 + 测试特性模块时,可以替换或移除路由模块。 * Provides a well-known location for routing service providers including guards and resolvers. - 为路由服务提供商(包括守卫和解析器等)提供一个共同的地方 + 为路由服务提供商(包括守卫和解析器等)提供一个共同的地方。 * Does **not** declare components. - **不要**[声明组件](guide/ngmodule-faq#routing-module) + **不要**声明组件。 {@a routing-refactor} diff --git a/aio/content/guide/setup.md b/aio/content/guide/setup.md index c2677689fe..a84ca2d0c4 100644 --- a/aio/content/guide/setup.md +++ b/aio/content/guide/setup.md @@ -314,7 +314,7 @@ The following are all in `src/` it's the only viable choice for a sample running in a _live-coding_ environment like Stackblitz. You'll learn about alternative compiling and [deployment](guide/deployment) options later in the documentation. - 使[即时 (JiT) 编译器](guide/glossary#jit)用编译应用并且在浏览器中[启动](guide/bootstrapping#main "启动应用")并运行应用。 + 使[即时 (JiT) 编译器](guide/glossary#jit)用编译应用并且在浏览器中[启动](guide/bootstrapping "启动应用")并运行应用。 对于大多数项目的开发,这都是合理的选择。而且它是在像 Stackblitz 这样的*在线编程*环境中运行例子的唯一选择。 你将在本文档中学习其他编译和开发选择。 diff --git a/aio/content/guide/testing.md b/aio/content/guide/testing.md index d5e4720305..6e132fd1ae 100644 --- a/aio/content/guide/testing.md +++ b/aio/content/guide/testing.md @@ -275,6 +275,7 @@ to the Angular [`HttpClient`](guide/http) service for XHR calls. You can test a data service with an injected `HttpClient` spy as you would test any service with a dependency. + diff --git a/aio/content/tutorial/toh-pt1.md b/aio/content/tutorial/toh-pt1.md index b4e8534573..12cfbf62ce 100644 --- a/aio/content/tutorial/toh-pt1.md +++ b/aio/content/tutorial/toh-pt1.md @@ -137,6 +137,7 @@ The browser refreshes and display's the hero's information. ## Format with the _UppercasePipe_ Modify the `hero.name` binding like this. + diff --git a/aio/content/tutorial/toh-pt6.md b/aio/content/tutorial/toh-pt6.md index 2093e66b8e..8bafc01351 100644 --- a/aio/content/tutorial/toh-pt6.md +++ b/aio/content/tutorial/toh-pt6.md @@ -147,6 +147,7 @@ as an `Observable`. Convert that method to use `HttpClient` + @@ -532,6 +533,7 @@ Replace the generated `HeroSearchComponent` class and metadata as follows. Notice the declaration of `heroes$` as an `Observable` + diff --git a/aio/yarn.lock b/aio/yarn.lock index 352d18ddef..fa9945d19e 100644 --- a/aio/yarn.lock +++ b/aio/yarn.lock @@ -5251,6 +5251,10 @@ lodash@^3.10.0, lodash@^3.10.1, lodash@^3.8.0, lodash@~3.10.0, lodash@~3.10.1: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" +lodash@^4.17.5: + version "4.17.5" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" + log-driver@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056"