fix: 修正了死链接
This commit is contained in:
parent
8f74eecc96
commit
b7ceb9e211
|
@ -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)。
|
||||
|
||||
</td>
|
||||
|
||||
|
|
|
@ -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)中会做深入讲解。
|
||||
|
||||
<br class="clear">
|
||||
|
||||
|
@ -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)。
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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)中进行声明。
|
||||
|
||||
</div >
|
||||
|
||||
|
|
|
@ -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中写组件测试:<live-example name="setup" plnkr="quickstart-specs">一个</live-example>用于测试快速起步中的`AppComponent`,<live-example name="testing" plnkr="banner-specs">另一个</live-example>用于测试“测试”章节的`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)
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ guide.
|
|||
|
||||
*提供商*是用来新建或者交付服务的。
|
||||
Angular拿到“类提供商”之后,会通过`new`操作来新建服务实例。
|
||||
从[依赖注入](guide/dependency-injection#injector-providers)一章可以学到关于提供商的更多知识。
|
||||
从[依赖注入](guide/dependency-injection#register-providers-ngmodule)一章可以学到关于提供商的更多知识。
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
<code-example
|
||||
path="http/src/app/http-interceptors/noop-interceptor.ts"
|
||||
title="app/http-interceptors/noop-interceptor.ts"
|
||||
|
|
|
@ -705,9 +705,7 @@ This sample file is easy to translate without a special editor or knowledge of F
|
|||
|
||||
1. Open `messages.fr.xlf` and find the first `<trans-unit>` section:
|
||||
|
||||
> <code-example path="i18n/doc-files/messages.fr.xlf.html" region="translated-hello-before" title="src/locale/messages.fr.xlf (<trans-unit>)" linenums="false">
|
||||
|
||||
</code-example>
|
||||
> <code-example path="i18n/doc-files/messages.fr.xlf.html" region="translated-hello-before" title="src/locale/messages.fr.xlf (<trans-unit>)" linenums="false"></code-example>
|
||||
|
||||
> This XML element represents the translation of the `<h1>` 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.
|
||||
|
||||
> <code-example path="i18n/doc-files/messages.fr.xlf.html" region="translated-hello" title="src/locale/messages.fr.xlf (<trans-unit>, after translation)" linenums="false">
|
||||
|
||||
</code-example>
|
||||
> <code-example path="i18n/doc-files/messages.fr.xlf.html" region="translated-hello" title="src/locale/messages.fr.xlf (<trans-unit>, after translation)" linenums="false"></code-example>
|
||||
|
||||
3. Translate the other text nodes the same way:
|
||||
|
||||
> <code-example path="i18n/doc-files/messages.fr.xlf.html" region="translated-other-nodes" title="src/locale/messages.fr.xlf (<trans-unit>)" linenums="false">
|
||||
|
||||
</code-example>
|
||||
> <code-example path="i18n/doc-files/messages.fr.xlf.html" region="translated-other-nodes" title="src/locale/messages.fr.xlf (<trans-unit>)" linenums="false"></code-example>
|
||||
|
||||
<div class="alert is-important">
|
||||
|
||||
|
|
|
@ -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`.
|
||||
|
|
|
@ -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)** - 一种特别的、专门为特性模块的路由器服务的**服务模块**。
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -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}
|
||||
|
||||
|
|
|
@ -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 这样的*在线编程*环境中运行例子的唯一选择。
|
||||
你将在本文档中学习其他编译和开发选择。
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
<code-example
|
||||
path="testing/src/app/model/hero.service.spec.ts"
|
||||
region="test-with-spies"
|
||||
|
|
|
@ -651,7 +651,7 @@ bootstrapping the AngularJS module.
|
|||
|
||||
For more information, see [NgModules](guide/ngmodules).
|
||||
|
||||
要了解更多,请参阅[NgModules](guide/ngmodule)页。
|
||||
要了解更多,请参阅[NgModules](guide/ngmodules)页。
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
<code-example
|
||||
path="toh-pt1/src/app/heroes/heroes.component.html"
|
||||
region="pipe">
|
||||
|
|
|
@ -147,6 +147,7 @@ as an `Observable<Hero[]>`.
|
|||
</code-example>
|
||||
|
||||
Convert that method to use `HttpClient`
|
||||
|
||||
<code-example
|
||||
path="toh-pt6/src/app/hero.service.ts"
|
||||
region="getHeroes-1">
|
||||
|
@ -532,6 +533,7 @@ Replace the generated `HeroSearchComponent` class and metadata as follows.
|
|||
<code-example path="toh-pt6/src/app/hero-search/hero-search.component.ts" title="src/app/hero-search/hero-search.component.ts"></code-example>
|
||||
|
||||
Notice the declaration of `heroes$` as an `Observable`
|
||||
|
||||
<code-example
|
||||
path="toh-pt6/src/app/hero-search/hero-search.component.ts"
|
||||
region="heroes-stream">
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue