fix: 人工修订自动翻译

This commit is contained in:
Zhicheng Wang 2018-03-07 12:26:05 +08:00
parent abb1f1321b
commit 9adeb14f3a
28 changed files with 932 additions and 846 deletions

View File

@ -17,11 +17,7 @@
</div>
<p>
Class description goes here. This is a short and to the point one or two sentence description that easily introduces the reader to the class.
</p>
<p>Class description goes here. This is a short and to the point one or two sentence description that easily introduces the reader to the class.</p>
<div class="api-body">
@ -45,11 +41,7 @@ Class description goes here. This is a short and to the point one or two sentenc
<h2>Description</h2>
<p>
The longer class description goes here which can include multiple paragraphs.
</p>
<p>The longer class description goes here which can include multiple paragraphs.</p>
</p>Bacon ipsum dolor amet pork belly capicola sirloin venison alcatra ground round ham hock jowl turkey picanha bresaola pancetta brisket chicken fatback. Burgdoggen kevin salami jowl shoulder jerky leberkas meatball. Ham hock picanha burgdoggen pork belly rump bacon cupim. Bacon kielbasa sirloin shank strip steak ground round. Bresaola cow salami meatloaf pork chop leberkas flank turducken biltong meatball chuck pork tri-tip chicken. Ribeye corned beef shoulder, meatloaf strip steak jerky porchetta capicola alcatra ham.</p>
@ -112,7 +104,6 @@ The longer class description goes here which can include multiple paragraphs.
<h2>Properties</h2>
<table class="is-full-width list-table">
<thead>
<tr>
@ -144,8 +135,8 @@ The longer class description goes here which can include multiple paragraphs.
</tr>
</thead>
<tbody>
<tr>
<td>
@ -167,6 +158,7 @@ The longer class description goes here which can include multiple paragraphs.
</td>
</tr>
<tr>
<td>
@ -190,6 +182,7 @@ The longer class description goes here which can include multiple paragraphs.
</td>
</tr>
<tr>
<td>
@ -213,6 +206,7 @@ The longer class description goes here which can include multiple paragraphs.
</td>
</tr>
</tbody>
</table>
</section>
@ -221,7 +215,6 @@ The longer class description goes here which can include multiple paragraphs.
<h2>Methods</h2>
<table class="is-full-width item-table">
<thead>
<tr>
@ -235,33 +228,25 @@ The longer class description goes here which can include multiple paragraphs.
</tr>
</thead>
<tbody>
<tr>
<td>
<p>
Description goes here
</p>
<p>Description goes here</p>
<br>
<p>
Bacon ipsum dolor amet pork belly capicola sirloin venison alcatra ground round ham hock jowl turkey picanha bresaola pancetta brisket chicken fatback. Burgdoggen kevin salami jowl shoulder jerky leberkas meatball. Ham hock picanha burgdoggen pork belly rump bacon cupim. Bacon kielbasa sirloin shank strip steak ground round. Bresaola cow salami meatloaf pork chop leberkas flank turducken biltong meatball chuck pork tri-tip chicken. Ribeye corned beef shoulder, meatloaf strip steak jerky porchetta capicola alcatra ham.
</p>
<p>Bacon ipsum dolor amet pork belly capicola sirloin venison alcatra ground round ham hock jowl turkey picanha bresaola pancetta brisket chicken fatback. Burgdoggen kevin salami jowl shoulder jerky leberkas meatball. Ham hock picanha burgdoggen pork belly rump bacon cupim. Bacon kielbasa sirloin shank strip steak ground round. Bresaola cow salami meatloaf pork chop leberkas flank turducken biltong meatball chuck pork tri-tip chicken. Ribeye corned beef shoulder, meatloaf strip steak jerky porchetta capicola alcatra ham.</p>
</td>
</tr>
</tbody>
</table>
<table class="is-full-width api-method item-table">
<thead>
<tr>
@ -275,17 +260,13 @@ Bacon ipsum dolor amet pork belly capicola sirloin venison alcatra ground round
</tr>
</thead>
<tbody>
<tr>
<td>
<p>
Description goes here
</p>
<p>Description goes here</p>
<hr>
@ -303,19 +284,11 @@ Description goes here
<h6>Returns</h6>
<p>
Returns information and results goes here.
</p>
<p>Returns information and results goes here.</p>
<h6>Errors</h6>
<p>
Error information goes here
</p>
<p>Error information goes here</p>
<hr>
@ -325,6 +298,7 @@ Error information goes here
<table class="is-full-width">
<tbody>
<tr>
<td>
@ -346,6 +320,7 @@ Error information goes here
</td>
</tr>
<tr>
<td>
@ -367,6 +342,7 @@ Error information goes here
</td>
</tr>
</tbody>
</table>
@ -374,15 +350,12 @@ Error information goes here
<h5>Example: Descriptive Title of Method Example</h5>
<p>
Bacon ipsum dolor amet pork belly capicola sirloin venison alcatra ground round ham hock jowl turkey picanha bresaola pancetta brisket chicken fatback. Burgdoggen kevin salami jowl shoulder jerky leberkas meatball. Ham hock picanha burgdoggen pork belly rump bacon cupim. Bacon kielbasa sirloin shank strip steak ground round. Bresaola cow salami meatloaf pork chop leberkas flank turducken biltong meatball chuck pork tri-tip chicken. Ribeye corned beef shoulder, meatloaf strip steak jerky porchetta capicola alcatra ham.
</p>
<p>Bacon ipsum dolor amet pork belly capicola sirloin venison alcatra ground round ham hock jowl turkey picanha bresaola pancetta brisket chicken fatback. Burgdoggen kevin salami jowl shoulder jerky leberkas meatball. Ham hock picanha burgdoggen pork belly rump bacon cupim. Bacon kielbasa sirloin shank strip steak ground round. Bresaola cow salami meatloaf pork chop leberkas flank turducken biltong meatball chuck pork tri-tip chicken. Ribeye corned beef shoulder, meatloaf strip steak jerky porchetta capicola alcatra ham.</p>
</td>
</tr>
</tbody>
</table>
</section>
@ -390,11 +363,7 @@ Bacon ipsum dolor amet pork belly capicola sirloin venison alcatra ground round
<h2>Example: Descriptive Title of Combined Example Goes Here</h2>
<p>
Intro description text about what the example is and how it can be used.
</p>
<p>Intro description text about what the example is and how it can be used.</p>
<code-example hidecopy="true" class="no-box api-heading" ng-version="5.2.0">
@ -404,11 +373,7 @@ Intro description text about what the example is and how it can be used.
</span><span class="pun">}[],</span><span class="pln"> duration</span><span class="pun">:</span><span class="pln"> number</span><span class="pun">,</span><span class="pln"> delay</span><span class="pun">:</span><span class="pln"> number</span><span class="pun">,</span><span class="pln"> easing</span><span class="pun">:</span><span class="pln"> </span><span class="kwd">string</span><span class="pun">,</span><span class="pln"> previousPlayers</span><span class="pun">:</span><span class="pln"> any</span><span class="pun">[])</span></code>
</pre></aio-code></code-example>
<p>
Further explanation provided as needed. Bacon ipsum dolor amet pork belly capicola sirloin venison alcatra ground round ham hock jowl turkey picanha bresaola pancetta brisket chicken fatback. Burgdoggen kevin salami jowl shoulder jerky leberkas meatball.
</p>
<p>Further explanation provided as needed. Bacon ipsum dolor amet pork belly capicola sirloin venison alcatra ground round ham hock jowl turkey picanha bresaola pancetta brisket chicken fatback. Burgdoggen kevin salami jowl shoulder jerky leberkas meatball.</p>
</section>

View File

@ -522,12 +522,14 @@ The final source code follows:
最终的源码如下:
<code-tabs>
<code-pane title="app/app.component.ts" path="attribute-directives/src/app/app.component.ts"></code-pane>
<code-pane title="app/app.component.html" path="attribute-directives/src/app/app.component.html"></code-pane>
<code-pane title="app/highlight.directive.ts" path="attribute-directives/src/app/highlight.directive.ts"></code-pane>
<code-pane title="app/app.module.ts" path="attribute-directives/src/app/app.module.ts"></code-pane>
<code-pane title="main.ts" path="attribute-directives/src/main.ts"></code-pane>
<code-pane title="index.html" path="attribute-directives/src/index.html"></code-pane>
</code-tabs>
You can also experience and download the <live-example title="Attribute Directive example"></live-example>.

View File

@ -81,6 +81,7 @@ Angular 支持大多数常用浏览器,包括下列版本:
</td>
</tr>
<tr>
<td>
@ -96,7 +97,9 @@ Angular 支持大多数常用浏览器,包括下列版本:
</td>
</tr>
<tr>
<tr>
<td>
@ -112,6 +115,7 @@ Angular 支持大多数常用浏览器,包括下列版本:
</td>
</tr>
<tr>
<td>
@ -129,6 +133,7 @@ Angular 支持大多数常用浏览器,包括下列版本:
</td>
</tr>
<tr>
<td>
@ -146,6 +151,7 @@ Angular 支持大多数常用浏览器,包括下列版本:
</td>
</tr>
<tr>
<td>

View File

@ -12,11 +12,13 @@
</th>
<th><p><code>import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';</code>
</p>
</th>
</tr>
<tr>
<td>
@ -30,6 +32,7 @@
</td>
</tr>
</tbody></table>
<table class="is-full-width is-fixed-layout">
@ -42,11 +45,13 @@
</th>
<th><p><code>import { NgModule } from '@angular/core';</code>
</p>
</th>
</tr>
<tr>
<td>
@ -121,6 +126,7 @@ is available to <code>declarations</code> of this module.</p>
</td>
</tr>
</tbody></table>
<table class="is-full-width is-fixed-layout">
@ -139,6 +145,7 @@ is available to <code>declarations</code> of this module.</p>
</th>
</tr>
<tr>
<td>
@ -310,6 +317,7 @@ is available to <code>declarations</code> of this module.</p>
</td>
</tr>
</tbody></table>
<table class="is-full-width is-fixed-layout">
@ -322,11 +330,13 @@ is available to <code>declarations</code> of this module.</p>
</th>
<th><p><code>import { CommonModule } from '@angular/common';</code>
</p>
</th>
</tr>
<tr>
<td>
@ -376,6 +386,7 @@ is available to <code>declarations</code> of this module.</p>
</td>
</tr>
<tr>
<td>
@ -389,6 +400,7 @@ is available to <code>declarations</code> of this module.</p>
</td>
</tr>
</tbody></table>
<table class="is-full-width is-fixed-layout">
@ -401,11 +413,13 @@ is available to <code>declarations</code> of this module.</p>
</th>
<th><p><code>import { FormsModule } from '@angular/forms';</code>
</p>
</th>
</tr>
<tr>
<td>
@ -419,6 +433,7 @@ is available to <code>declarations</code> of this module.</p>
</td>
</tr>
</tbody></table>
<table class="is-full-width is-fixed-layout">
@ -431,11 +446,13 @@ is available to <code>declarations</code> of this module.</p>
</th>
<th><p><code>import { Directive, ... } from '@angular/core';</code>
</p>
</th>
</tr>
<tr>
<td>
@ -481,11 +498,13 @@ is available to <code>declarations</code> of this module.</p>
</td>
<td><p>Declares that a class has dependencies that should be injected into the constructor when the dependency injector is creating an instance of this class.
</p>
</td>
</tr>
</tbody></table>
<table class="is-full-width is-fixed-layout">
@ -498,11 +517,13 @@ is available to <code>declarations</code> of this module.</p>
</th>
<th><p><code>@Directive({ property1: value1, ... })</code>
</p>
</th>
</tr>
<tr>
<td>
@ -514,11 +535,7 @@ is available to <code>declarations</code> of this module.</p>
<td><p>Specifies a CSS selector that identifies this directive within a template. Supported selectors include <code>element</code>,
<code>[attribute]</code>, <code>.class</code>, and <code>:not()</code>.</p>
<p>
Does not support parent-child relationship selectors.
</p>
<p>Does not support parent-child relationship selectors.</p>
</td>
@ -535,6 +552,7 @@ Does not support parent-child relationship selectors.
</td>
</tr>
</tbody></table>
<table class="is-full-width is-fixed-layout">
@ -553,6 +571,7 @@ so the <code>@Directive</code> configuration applies to components as well</p>
</th>
</tr>
<tr>
<td>
@ -602,6 +621,7 @@ so the <code>@Directive</code> configuration applies to components as well</p>
</td>
</tr>
</tbody></table>
<table class="is-full-width is-fixed-layout">
@ -614,11 +634,13 @@ so the <code>@Directive</code> configuration applies to components as well</p>
</th>
<th><p><code>import { Input, ... } from '@angular/core';</code>
</p>
</th>
</tr>
<tr>
<td>
@ -717,6 +739,7 @@ so the <code>@Directive</code> configuration applies to components as well</p>
</td>
</tr>
</tbody></table>
<table class="is-full-width is-fixed-layout">
@ -729,11 +752,13 @@ so the <code>@Directive</code> configuration applies to components as well</p>
</th>
<th><p>(implemented as class methods)
</p>
</th>
</tr>
<tr>
<td>
@ -843,6 +868,7 @@ so the <code>@Directive</code> configuration applies to components as well</p>
</td>
</tr>
</tbody></table>
<table class="is-full-width is-fixed-layout">
@ -859,6 +885,7 @@ so the <code>@Directive</code> configuration applies to components as well</p>
</th>
</tr>
<tr>
<td>
@ -896,6 +923,7 @@ so the <code>@Directive</code> configuration applies to components as well</p>
</td>
</tr>
</tbody></table>
<table class="is-full-width is-fixed-layout">
@ -908,11 +936,13 @@ so the <code>@Directive</code> configuration applies to components as well</p>
</th>
<th><p><code>import { Routes, RouterModule, ... } from '@angular/router';</code>
</p>
</th>
</tr>
<tr>
<td>
@ -1022,6 +1052,7 @@ so the <code>@Directive</code> configuration applies to components as well</p>
</td>
</tr>
</tbody></table>
</div>

View File

@ -142,6 +142,7 @@ The following code snippets illustrate how the same kind of operation is defined
</td>
</tr>
<tr>
<td>
@ -163,6 +164,7 @@ The following code snippets illustrate how the same kind of operation is defined
</td>
</tr>
<tr>
<td>
@ -188,6 +190,7 @@ The following code snippets illustrate how the same kind of operation is defined
</td>
</tr>
<tr>
<td>
@ -209,6 +212,7 @@ The following code snippets illustrate how the same kind of operation is defined
</td>
</tr>
</table>
## Observables compared to events API
@ -272,6 +276,7 @@ button.removeEventListener(click, handler);
</td>
</tr>
<tr>
<td>
@ -297,6 +302,7 @@ button.removeEventListener(click, handler);
</td>
</tr>
<tr>
<td>
@ -321,6 +327,7 @@ button.removeEventListener(click, handler);
</td>
</tr>
</table>
## Observables compared to arrays
@ -368,6 +375,7 @@ An observable produces values over time. An array is created as a static set of
</td>
</tr>
<tr>
<td>
@ -391,6 +399,7 @@ An observable produces values over time. An array is created as a static set of
</td>
</tr>
<tr>
<td>
@ -414,6 +423,7 @@ An observable produces values over time. An array is created as a static set of
</td>
</tr>
<tr>
<td>
@ -437,6 +447,7 @@ An observable produces values over time. An array is created as a static set of
</td>
</tr>
<tr>
<td>
@ -460,6 +471,7 @@ An observable produces values over time. An array is created as a static set of
</td>
</tr>
<tr>
<td>
@ -495,6 +507,7 @@ An observable produces values over time. An array is created as a static set of
</td>
</tr>
<tr>
<td>
@ -518,6 +531,7 @@ An observable produces values over time. An array is created as a static set of
</td>
</tr>
<tr>
<td>
@ -541,4 +555,5 @@ An observable produces values over time. An array is created as a static set of
</td>
</tr>
</table>

View File

@ -290,8 +290,10 @@ to a component's `@Component` decorator:
我们可以通过把外部 CSS 文件添加到 `@Component``styleUrls` 属性中来加载外部样式。
<code-tabs>
<code-pane title="src/app/hero-app.component.ts (CSS in file)" path="component-styles/src/app/hero-app.component.1.ts"></code-pane>
<code-pane title="src/app/hero-app.component.css" path="component-styles/src/app/hero-app.component.css"></code-pane>
</code-tabs>
<div class="alert is-critical">

View File

@ -16,6 +16,7 @@ Start by reviewing this simplified version of the _heroes_ feature
from the [The Tour of Heroes](tutorial/).
<code-tabs>
<code-pane title="src/app/heroes/heroes.component.ts" path="dependency-injection/src/app/heroes/heroes.component.1.ts"
region="v1">
</code-pane>
@ -218,11 +219,13 @@ Of course, the `HeroListComponent` should do something with the injected `HeroSe
Here's the revised component, making use of the injected service, side-by-side with the previous version for comparison.
<code-tabs>
<code-pane title="hero-list.component (with DI)" path="dependency-injection/src/app/heroes/hero-list.component.2.ts">
</code-pane>
<code-pane title="hero-list.component (without DI)" path="dependency-injection/src/app/heroes/hero-list.component.1.ts">
</code-pane>
</code-tabs>
Notice that the `HeroListComponent` doesn't know where the `HeroService` comes from.

View File

@ -125,8 +125,11 @@ All section heading text should be in "Sentence case", which means the first wor
**Always follow the section heading with at least one blank line.**
<h2 class="no-toc">
Main section heading
</h2>
There are usually one or more main sections that may be further divided into secondary sections.
Begin a main section heading with the markdown `##` characters. Alternatively, you can write the equivalent `<h2>` HTML tag.
@ -142,7 +145,9 @@ The main section heading should be followed by a blank line and then the content
```
<h3 class="no-toc">
Secondary section heading
</h3>
A secondary section heading is related to a main heading and _falls textually within_ the bounds of that main heading.
@ -214,7 +219,9 @@ To exclude a heading from the TOC, create the heading as an `<h2>` or `<h3>` ele
```html
<h3 class="no-toc">
This heading is not displayed in the TOC
</h3>
```
@ -224,7 +231,9 @@ You can turn off TOC generation for the _entire_ page by writing the title with
```html
<h1 class="no-toc">
A guide without a TOC
</h1>
```
@ -510,6 +519,7 @@ The next example displays multiple code tabs, each with its own title.
It demonstrates control over display of line numbers at both the `<code-tabs>` and `<code-pane>` levels.
<code-tabs linenums="false">
<code-pane
title="app.component.html"
path="docs-style-guide/src/app/app.component.html">
@ -528,6 +538,7 @@ It demonstrates control over display of line numbers at both the `<code-tabs>` a
title="package.json (scripts)"
path="docs-style-guide/package.1.json">
</code-pane>
</code-tabs>
Here's the markup for that example.
@ -538,6 +549,7 @@ The `linenums` attribute in the second pane restores line numbering for _itself
```html
<code-tabs linenums="false">
<code-pane
title="app.component.html"
path="docs-style-guide/src/app/app.component.html">
@ -556,6 +568,7 @@ The `linenums` attribute in the second pane restores line numbering for _itself
title="package.json (scripts)"
path="docs-style-guide/package.1.json">
</code-pane>
</code-tabs>
```
@ -710,6 +723,7 @@ export class AppComponent {
Here's are the two corresponding code snippets displayed side-by-side.
<code-tabs>
<code-pane
title="app.component.ts (class)"
path="docs-style-guide/src/app/app.component.ts"
@ -720,6 +734,7 @@ Here's are the two corresponding code snippets displayed side-by-side.
path="docs-style-guide/src/app/app.component.ts"
region="class-skeleton">
</code-pane>
</code-tabs>
Some observations:
@ -1259,6 +1274,7 @@ Use HTML tables to present tabular data.
</style>
<table>
<tr>
<th>
@ -1280,6 +1296,7 @@ Use HTML tables to present tabular data.
</th>
</tr>
<tr>
<td>
@ -1301,6 +1318,7 @@ Use HTML tables to present tabular data.
</td>
</tr>
<tr>
<td>
@ -1324,6 +1342,7 @@ Use HTML tables to present tabular data.
</td>
</tr>
<tr>
<td>
@ -1345,6 +1364,7 @@ Use HTML tables to present tabular data.
</td>
</tr>
</table>
Here is the markup for this table.
@ -1356,6 +1376,7 @@ Here is the markup for this table.
</style>
<table>
<tr>
<th>
@ -1377,6 +1398,7 @@ Here is the markup for this table.
</th>
</tr>
<tr>
<td>
@ -1398,6 +1420,7 @@ Here is the markup for this table.
</td>
</tr>
<tr>
<td>
@ -1421,6 +1444,7 @@ Here is the markup for this table.
</td>
</tr>
<tr>
<td>
@ -1442,6 +1466,7 @@ Here is the markup for this table.
</td>
</tr>
</table>
```

View File

@ -418,9 +418,7 @@ the number of minutes.
<div class="l-sub-section">
This syntax conforms to the
<a href="http://userguide.icu-project.org/formatparse/messages" title="ICU Message Format">ICU Message Format</a>
as specified in the
<a href="http://cldr.unicode.org/index/cldr-spec/plural-rules" title="Pluralization Rules">CLDR pluralization rules</a>.
@ -854,6 +852,7 @@ The sample app and its translation file are now as follows:
下面是例子应用及其翻译文件:
<code-tabs>
<code-pane title="src/app/app.component.html" path="i18n/src/app/app.component.html">
</code-pane>
<code-pane title="src/app/app.component.ts" path="i18n/src/app/app.component.ts">
@ -864,6 +863,7 @@ The sample app and its translation file are now as follows:
</code-pane>
<code-pane title="src/locale/messages.fr.xlf" path="i18n/doc-files/messages.fr.xlf.html">
</code-pane>
</code-tabs>
{@a merge}

View File

@ -62,6 +62,7 @@ calls the lifecycle hook methods in the following sequence at specific moments:
<table width="100%">
<col width="20%"></col>
<col width="80%"></col>
<tr>
<th>
@ -77,6 +78,7 @@ calls the lifecycle hook methods in the following sequence at specific moments:
</th>
</tr>
<tr style='vertical-align:top'>
<td>
@ -100,6 +102,7 @@ calls the lifecycle hook methods in the following sequence at specific moments:
</td>
</tr>
<tr style='vertical-align:top'>
<td>
@ -122,6 +125,7 @@ calls the lifecycle hook methods in the following sequence at specific moments:
</td>
</tr>
<tr style='vertical-align:top'>
<td>
@ -143,6 +147,7 @@ calls the lifecycle hook methods in the following sequence at specific moments:
</td>
</tr>
<tr style='vertical-align:top'>
<td>
@ -164,6 +169,7 @@ calls the lifecycle hook methods in the following sequence at specific moments:
</td>
</tr>
<tr style='vertical-align:top'>
<td>
@ -185,6 +191,7 @@ calls the lifecycle hook methods in the following sequence at specific moments:
</td>
</tr>
<tr style='vertical-align:top'>
<td>
@ -206,6 +213,7 @@ calls the lifecycle hook methods in the following sequence at specific moments:
</td>
</tr>
<tr style='vertical-align:top'>
<td>
@ -227,6 +235,7 @@ calls the lifecycle hook methods in the following sequence at specific moments:
</td>
</tr>
<tr style='vertical-align:top'>
<td>
@ -250,6 +259,7 @@ calls the lifecycle hook methods in the following sequence at specific moments:
</td>
</tr>
</table>
{@a interface-optional}
@ -321,6 +331,7 @@ Here's a brief description of each exercise:
<table width="100%">
<col width="20%"></col>
<col width="80%"></col>
<tr>
<th>
@ -338,6 +349,7 @@ Here's a brief description of each exercise:
</th>
</tr>
<tr style='vertical-align:top'>
<td>
@ -356,6 +368,7 @@ Here's a brief description of each exercise:
</td>
</tr>
<tr style='vertical-align:top'>
<td>
@ -380,6 +393,7 @@ Here's a brief description of each exercise:
</td>
</tr>
<tr style='vertical-align:top'>
<td>
@ -400,6 +414,7 @@ Here's a brief description of each exercise:
</td>
</tr>
<tr style='vertical-align:top'>
<td>
@ -419,6 +434,7 @@ Here's a brief description of each exercise:
</td>
</tr>
<tr style='vertical-align:top'>
<td>
@ -438,6 +454,7 @@ Here's a brief description of each exercise:
</td>
</tr>
<tr style='vertical-align:top'>
<td>
@ -458,6 +475,7 @@ Here's a brief description of each exercise:
</td>
</tr>
<tr style='vertical-align:top'>
<td>
@ -486,6 +504,7 @@ Here's a brief description of each exercise:
</td>
</tr>
</table>
The remainder of this page discusses selected exercises in further detail.

View File

@ -73,6 +73,7 @@ typical characteristics, in real world apps, you may see hybrids.
</td>
</tr>
<tr>
<td>
@ -202,6 +203,7 @@ typical characteristics, in real world apps, you may see hybrids.
The following table summarizes the key characteristics of each feature module group.
<table>
<tr>
<th style="vertical-align: top">
@ -407,6 +409,7 @@ The following table summarizes the key characteristics of each feature module gr
</td>
</tr>
</table>
<hr />

View File

@ -298,6 +298,7 @@ Any files outside of this folder are meant to support building your app.
</col>
<col width="80%">
</col>
<tr>
<th>
@ -317,6 +318,7 @@ Any files outside of this folder are meant to support building your app.
</th>
</tr>
<tr>
<td>
@ -337,6 +339,7 @@ Any files outside of this folder are meant to support building your app.
</td>
</tr>
<tr>
<td>
@ -358,6 +361,7 @@ Any files outside of this folder are meant to support building your app.
</td>
</tr>
<tr>
<td>
@ -376,6 +380,7 @@ Any files outside of this folder are meant to support building your app.
</td>
</tr>
<tr>
<td>
@ -403,6 +408,7 @@ Any files outside of this folder are meant to support building your app.
</td>
</tr>
<tr>
<td>
@ -422,6 +428,7 @@ Any files outside of this folder are meant to support building your app.
</td>
</tr>
<tr>
<td>
@ -444,6 +451,7 @@ Any files outside of this folder are meant to support building your app.
</td>
</tr>
<tr>
<td>
@ -467,6 +475,7 @@ Any files outside of this folder are meant to support building your app.
</td>
</tr>
<tr>
<td>
@ -489,6 +498,7 @@ Any files outside of this folder are meant to support building your app.
</td>
</tr>
<tr>
<td>
@ -509,6 +519,7 @@ Any files outside of this folder are meant to support building your app.
</td>
</tr>
<tr>
<td>
@ -529,6 +540,7 @@ Any files outside of this folder are meant to support building your app.
</td>
</tr>
<tr>
<td>
@ -547,6 +559,7 @@ Any files outside of this folder are meant to support building your app.
</td>
</tr>
</table>
### The root folder
@ -613,6 +626,7 @@ These files go in the root folder next to `src/`.
</col>
<col width="80%">
</col>
<tr>
<th>
@ -632,6 +646,7 @@ These files go in the root folder next to `src/`.
</th>
</tr>
<tr>
<td>
@ -654,6 +669,7 @@ These files go in the root folder next to `src/`.
</td>
</tr>
<tr>
<td>
@ -672,6 +688,7 @@ These files go in the root folder next to `src/`.
</td>
</tr>
<tr>
<td>
@ -694,6 +711,7 @@ These files go in the root folder next to `src/`.
</td>
</tr>
<tr>
<td>
@ -715,6 +733,7 @@ These files go in the root folder next to `src/`.
</td>
</tr>
<tr>
<td>
@ -732,6 +751,7 @@ These files go in the root folder next to `src/`.
</td>
</tr>
<tr>
<td>
@ -750,6 +770,7 @@ These files go in the root folder next to `src/`.
</td>
</tr>
<tr>
<td>
@ -769,6 +790,7 @@ These files go in the root folder next to `src/`.
</td>
</tr>
<tr>
<td>
@ -787,6 +809,7 @@ These files go in the root folder next to `src/`.
</td>
</tr>
<tr>
<td>
@ -807,6 +830,7 @@ These files go in the root folder next to `src/`.
</td>
</tr>
<tr>
<td>
@ -824,6 +848,7 @@ These files go in the root folder next to `src/`.
</td>
</tr>
<tr>
<td>
@ -844,6 +869,7 @@ These files go in the root folder next to `src/`.
</td>
</tr>
</table>
<div class="l-sub-section">

View File

@ -294,6 +294,7 @@ It has a great deal of useful information including:
它有一大堆有用的信息,包括:
<table>
<tr>
<th>
@ -493,6 +494,7 @@ It has a great deal of useful information including:
</td>
</tr>
</table>
<div class="l-sub-section">
@ -521,6 +523,7 @@ During each navigation, the `Router` emits navigation events through the `Router
在每次导航中,`Router`都会通过`Router.events`属性发布一些导航事件。这些事件的范围涵盖了从开始导航到结束导航之间的很多时间点。下表中列出了全部导航事件:
<table>
<tr>
<th>
@ -669,6 +672,7 @@ During each navigation, the `Router` emits navigation events through the `Router
</td>
</tr>
</table>
These events are logged to the console when the `enableTracing` option is enabled also. Since the events are provided as an `Observable`, you can `filter()` for events of interest and `subscribe()` to them to make decisions based on the sequence of events in the navigation process.
@ -2488,6 +2492,7 @@ to handle parameter access for both route parameters (`paramMap`) and query para
`ParamMap` API 是参照[URLSearchParams 接口](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)来设计的。它提供了一些方法来处理对路由参数(`paramMap`)和查询参数(`queryParamMap`)中的参数访问。
<table>
<tr>
<th>
@ -2579,6 +2584,7 @@ to handle parameter access for both route parameters (`paramMap`) and query para
</td>
</tr>
</table>
{@a reuse}

View File

@ -89,9 +89,11 @@ Here's the complete solution:
这里是完整的方案(代码)。
<code-tabs>
<code-pane title="src/main.ts" path="set-document-title/src/main.ts"></code-pane>
<code-pane title="src/app/app.module.ts" path="set-document-title/src/app/app.module.ts"></code-pane>
<code-pane title="src/app/app.component.ts" path="set-document-title/src/app/app.component.ts"></code-pane>
</code-tabs>
## Why provide the `Title` service in `bootstrap`

View File

@ -166,6 +166,7 @@ Now `parentModule` exists and the constructor throws the error.
Here are the two files in their entirety for reference:
<code-tabs linenums="false">
<code-pane
title="app.module.ts"
path="ngmodules/src/app/app.module.ts">
@ -175,6 +176,7 @@ Here are the two files in their entirety for reference:
region="whole-core-module"
path="ngmodules/src/app/core/core.module.ts">
</code-pane>
</code-tabs>
<hr>

View File

@ -518,6 +518,7 @@ from the _source-to-view_, from _view-to-source_, and in the two-way sequence: _
</col>
<col width="20%">
</col>
<tr>
<th>
@ -545,6 +546,7 @@ from the _source-to-view_, from _view-to-source_, and in the two-way sequence: _
</th>
</tr>
<tr>
<td>
@ -611,6 +613,7 @@ from the _source-to-view_, from _view-to-source_, and in the two-way sequence: _
</td>
</tr>
<tr>
<td>
@ -641,7 +644,9 @@ from the _source-to-view_, from _view-to-source_, and in the two-way sequence: _
</td>
</tr>
</tr>
</table>
@ -877,6 +882,7 @@ The following table summarizes:
</col>
<col width="75%">
</col>
<tr>
<th>
@ -904,6 +910,7 @@ The following table summarizes:
</th>
</tr>
<tr>
<td>
@ -935,6 +942,7 @@ The following table summarizes:
</td>
</tr>
<tr>
<td>
@ -966,6 +974,7 @@ The following table summarizes:
</td>
</tr>
<tr>
<td>
@ -993,6 +1002,7 @@ The following table summarizes:
</td>
</tr>
<tr>
<td>
@ -1019,6 +1029,7 @@ The following table summarizes:
</td>
</tr>
<tr>
<td>
@ -1044,6 +1055,7 @@ The following table summarizes:
</td>
</tr>
<tr>
<td>
@ -1069,6 +1081,7 @@ The following table summarizes:
</td>
</tr>
</table>
With this broad view in mind, you're ready to look at binding types in detail.

View File

@ -1609,9 +1609,7 @@ in a helper such as the `click()` function below:
The first parameter is the _element-to-click_. If you wish, you can pass a
custom event object as the second parameter. The default is a (partial)
<a href="https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button">left-button mouse event object</a>
accepted by many handlers including the `RouterLink` directive.
<div class="alert is-important">
@ -2701,6 +2699,7 @@ The [_TestBed_](#testbed-api-summary) and [_ComponentFixture_](#component-fixtur
Here's a summary of the stand-alone functions, in order of likely utility:
<table>
<tr>
<th>
@ -2876,6 +2875,7 @@ Here's a summary of the stand-alone functions, in order of likely utility:
</td>
</tr>
</table>
<hr>
@ -2933,6 +2933,7 @@ Call `TestBed` methods _within_ a `beforeEach()` to ensure a fresh start before
Here are the most important static methods, in order of likely utility.
<table>
<tr>
<th>
@ -3153,6 +3154,7 @@ Here are the most important static methods, in order of likely utility.
</td>
</tr>
</table
A few of the `TestBed` instance methods are not covered by static `TestBed` _class_ methods.
@ -3176,6 +3178,7 @@ its DOM representation, and aspects of its Angular environment.
Here are the most important properties for testers, in order of likely utility.
<table>
<tr>
<th>
@ -3264,6 +3267,7 @@ Here are the most important properties for testers, in order of likely utility.
</td>
</tr>
</table>
{@a component-fixture-methods}
@ -3276,6 +3280,7 @@ Call these method to trigger Angular behavior in response to simulated user acti
Here are the most useful methods for testers.
<table>
<tr>
<th>
@ -3412,6 +3417,7 @@ Here are the most useful methods for testers.
</td>
</tr>
</table>
{@a debug-element-details}
@ -3426,6 +3432,7 @@ you can walk (and query) the fixture's entire element and component subtrees.
Here are the most useful `DebugElement` members for testers, in approximate order of utility:
<table>
<tr>
<th>
@ -3693,6 +3700,7 @@ Here are the most useful `DebugElement` members for testers, in approximate orde
</td>
</tr>
</table>
{@a query-predicate}

View File

@ -373,6 +373,7 @@ frameworks in how it actually works.
无论是在AngularJS中还是在Angular中依赖注入都位于前沿和中心的位置但在两个框架的工作原理上却存在着一些关键的不同之处。
<table>
<tr>
<th>
@ -388,6 +389,7 @@ frameworks in how it actually works.
</th>
</tr>
<tr>
<td>
@ -409,6 +411,7 @@ frameworks in how it actually works.
</td>
</tr>
<tr>
<td>
@ -430,6 +433,7 @@ frameworks in how it actually works.
</td>
</tr>
</table>
Even accounting for these differences you can still have dependency injection
@ -992,6 +996,7 @@ observing the following rules:
当我们从Angular模板中使用该组件时我们要使用**Angular模板语法**来提供这些输入属性和输出属性,但要遵循下列规则:
<table>
<tr>
<th>
@ -1015,6 +1020,7 @@ observing the following rules:
</th>
</tr>
<tr>
<th>
@ -1038,6 +1044,7 @@ observing the following rules:
</td>
</tr>
<tr>
<th>
@ -1061,6 +1068,7 @@ observing the following rules:
</td>
</tr>
<tr>
<th>
@ -1084,6 +1092,7 @@ observing the following rules:
</td>
</tr>
<tr>
<th>
@ -1112,6 +1121,7 @@ observing the following rules:
</td>
</tr>
</table>
For example, imagine a hero detail AngularJS component directive
@ -2883,6 +2893,7 @@ For PhoneCat you need to make the following changes in order to make things work
这是因为E2E测试有一些匹配器是AngularJS中特有的。对于PhoneCat来说为了让它能在Angular下工作我们得做下列修改
<table>
<tr>
<th>
@ -2910,6 +2921,7 @@ For PhoneCat you need to make the following changes in order to make things work
</th>
</tr>
<tr>
<td>
@ -2933,6 +2945,7 @@ For PhoneCat you need to make the following changes in order to make things work
</td>
</tr>
<tr>
<td>
@ -2956,6 +2969,7 @@ For PhoneCat you need to make the following changes in order to make things work
</td>
</tr>
<tr>
<td>
@ -2979,6 +2993,7 @@ For PhoneCat you need to make the following changes in order to make things work
</td>
</tr>
<tr>
<td>
@ -3002,6 +3017,7 @@ For PhoneCat you need to make the following changes in order to make things work
</td>
</tr>
<tr>
<td>
@ -3025,6 +3041,7 @@ For PhoneCat you need to make the following changes in order to make things work
</td>
</tr>
</table>
When the bootstrap method is switched from that of `UpgradeModule` to

View File

@ -132,7 +132,7 @@ Visual Studio将优先在当前的工作区查找外部工具如果没有找
<h2 id='prereq4'>
Prerequisite: Install TypeScript 2.2 for Visual Studio 2015
前提条件: 安装TypeScript 2.2 for Visual Studio 2015
</h2>

View File

@ -118,6 +118,7 @@ Here are the code files discussed on this page.
title="src/styles.css (excerpt)"
path="toh-pt0/src/styles.1.css">
</code-pane>
</code-tabs>
## Summary

View File

@ -254,6 +254,7 @@ Your app should look like this <live-example></live-example>.
Here are the code files discussed on this page, including the `HeroesComponent` styles.
<code-tabs>
<code-pane title="src/app/heroes/heroes.component.ts" path="toh-pt2/src/app/heroes/heroes.component.ts">
</code-pane>
@ -262,6 +263,7 @@ Here are the code files discussed on this page, including the `HeroesComponent`
<code-pane title="src/app/heroes/heroes.component.css" path="toh-pt2/src/app/heroes/heroes.component.css">
</code-pane>
</code-tabs>
## Summary

View File

@ -205,6 +205,7 @@ The CLI generates the files for the `DashboardComponent` and declares it in `App
Replace the default file content in these three files as follows and then return for a little discussion:
<code-tabs>
<code-pane
title="src/app/dashboard/dashboard.component.html" path="toh-pt5/src/app/dashboard/dashboard.component.1.html">
</code-pane>
@ -216,6 +217,7 @@ Replace the default file content in these three files as follows and then return
<code-pane
title="src/app/dashboard/dashboard.component.css" path="toh-pt5/src/app/dashboard/dashboard.component.css">
</code-pane>
</code-tabs>
The _template_ presents a grid of hero name links.
@ -567,6 +569,7 @@ Here are the code files discussed on this page and your app should look like thi
#### _AppRoutingModule_ and _AppModule_
<code-tabs>
<code-pane
title="src/app/app-routing.module.ts"
path="toh-pt5/src/app/app-routing.module.ts">
@ -575,6 +578,7 @@ Here are the code files discussed on this page and your app should look like thi
title="src/app/app.module.ts"
path="toh-pt5/src/app/app.module.ts">
</code-pane>
</code-tabs>
{@a appcomponent}
@ -582,6 +586,7 @@ Here are the code files discussed on this page and your app should look like thi
#### _AppComponent_
<code-tabs>
<code-pane
title="src/app/app.component.html"
path="toh-pt5/src/app/app.component.html">
@ -591,6 +596,7 @@ Here are the code files discussed on this page and your app should look like thi
title="src/app/app.component.css"
path="toh-pt5/src/app/app.component.css">
</code-pane>
</code-tabs>
{@a dashboardcomponent}
@ -598,6 +604,7 @@ Here are the code files discussed on this page and your app should look like thi
#### _DashboardComponent_
<code-tabs>
<code-pane
title="src/app/dashboard/dashboard.component.html" path="toh-pt5/src/app/dashboard/dashboard.component.html">
</code-pane>
@ -609,6 +616,7 @@ Here are the code files discussed on this page and your app should look like thi
<code-pane
title="src/app/dashboard/dashboard.component.css" path="toh-pt5/src/app/dashboard/dashboard.component.css">
</code-pane>
</code-tabs>
{@a heroescomponent}
@ -616,6 +624,7 @@ Here are the code files discussed on this page and your app should look like thi
#### _HeroesComponent_
<code-tabs>
<code-pane
title="src/app/heroes/heroes.component.html" path="toh-pt5/src/app/heroes/heroes.component.html">
</code-pane>
@ -629,6 +638,7 @@ Here are the code files discussed on this page and your app should look like thi
title="src/app/heroes/heroes.component.css"
path="toh-pt5/src/app/heroes/heroes.component.css">
</code-pane>
</code-tabs>
{@a herodetailcomponent}
@ -636,6 +646,7 @@ Here are the code files discussed on this page and your app should look like thi
#### _HeroDetailComponent_
<code-tabs>
<code-pane
title="src/app/hero-detail/hero-detail.component.html" path="toh-pt5/src/app/hero-detail/hero-detail.component.html">
</code-pane>
@ -647,6 +658,7 @@ Here are the code files discussed on this page and your app should look like thi
<code-pane
title="src/app/hero-detail/hero-detail.component.css" path="toh-pt5/src/app/hero-detail/hero-detail.component.css">
</code-pane>
</code-tabs>
## Summary

View File

@ -610,6 +610,7 @@ Here are the code files discussed on this page (all in the `src/app/` folder).
#### _HeroService_, _InMemoryDataService_, _AppModule_
<code-tabs>
<code-pane
title="hero.service.ts"
path="toh-pt6/src/app/hero.service.ts">
@ -622,6 +623,7 @@ Here are the code files discussed on this page (all in the `src/app/` folder).
title="app.module.ts"
path="toh-pt6/src/app/app.module.ts">
</code-pane>
</code-tabs>
{@a heroescomponent}
@ -629,6 +631,7 @@ Here are the code files discussed on this page (all in the `src/app/` folder).
#### _HeroesComponent_
<code-tabs>
<code-pane
title="heroes/heroes.component.html"
path="toh-pt6/src/app/heroes/heroes.component.html">
@ -641,6 +644,7 @@ Here are the code files discussed on this page (all in the `src/app/` folder).
title="heroes/heroes.component.css"
path="toh-pt6/src/app/heroes/heroes.component.css">
</code-pane>
</code-tabs>
{@a herodetailcomponent}
@ -648,6 +652,7 @@ Here are the code files discussed on this page (all in the `src/app/` folder).
#### _HeroDetailComponent_
<code-tabs>
<code-pane
title="hero-detail/hero-detail.component.html"
path="toh-pt6/src/app/hero-detail/hero-detail.component.html">
@ -656,6 +661,7 @@ Here are the code files discussed on this page (all in the `src/app/` folder).
title="hero-detail/hero-detail.component.ts"
path="toh-pt6/src/app/hero-detail/hero-detail.component.ts">
</code-pane>
</code-tabs>
{@a herosearchcomponent}
@ -663,6 +669,7 @@ Here are the code files discussed on this page (all in the `src/app/` folder).
#### _HeroSearchComponent_
<code-tabs>
<code-pane
title="hero-search/hero-search.component.html"
path="toh-pt6/src/app/hero-search/hero-search.component.html">
@ -675,6 +682,7 @@ Here are the code files discussed on this page (all in the `src/app/` folder).
title="hero-search/hero-search.component.css"
path="toh-pt6/src/app/hero-search/hero-search.component.css">
</code-pane>
</code-tabs>
## Summary

View File

@ -3,5 +3,5 @@
import { dirs } from '../dirs';
import { translateFile } from '../translate';
const filename = 'guide/i18n.md';
const filename = 'guide/router.md';
translateFile(__dirname + '/../../../../../content-en/' + filename, dirs.content + filename);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -89,6 +89,27 @@ def
`);
});
it('拆解多行的 h\\d 标签', function () {
const lines = normalizeLines(`
a
<h3 id="abc">
line
</h3>
b
`);
expect(lines).eql(`
a
<h3 id="abc">
line
</h3>
b
`);
});
it('拆解单行的 th 标签', function () {
const lines = normalizeLines(`
a
@ -123,6 +144,23 @@ def
`);
});
it('拆解多行注释', function () {
const lines = normalizeLines(`
a
<!-- no
abc -->
b
`);
expect(lines).eql(`
a
<!-- no
abc -->
b
`);
});
it('拆解单行br', function () {
const lines = normalizeLines(`
a

View File

@ -56,7 +56,7 @@ export function normalizeLines(text: string): string {
text = text.replace(oneLinePairedTagPattern, '\n\n$1<$2$3>$4</$2>$5\n');
const oneLineThTdTagPattern = /\n( *)<(th|td|li)( ?[^>\n]*)>(.*)<\/\2>( *)(?=\n)/g;
text = text.replace(oneLineThTdTagPattern, '\n\n$1<$2$3>\n\n$1 $4\n\n$1</$2>$5\n');
const oneLineCommentPattern = /\n( *)(<!--.*-->)( *)(?=\n)/g;
const oneLineCommentPattern = /\n( *)(<!--[\s\S]*?-->)( *)(?=\n)/g;
text = text.replace(oneLineCommentPattern, '\n\n$1$2$3\n');
const oneLineBrTagPattern = /\n( *)(<br class="clear">)( *)(?=\n)/g;
text = text.replace(oneLineBrTagPattern, '\n\n$1$2$3\n');
@ -67,7 +67,7 @@ export function normalizeLines(text: string): string {
const multiLinePairedTagPattern = /\n( *)<(header)( *[^>\n]*)>\n*(.*?)\n*( *)<\/\2>( *)(?=\n)/g;
text = text.replace(multiLinePairedTagPattern, '\n\n$1<$2$3>\n\n$4\n\n$5</$2>$6\n');
const blockTagPattern = /\n( *)<(\/?)(td|th|div|code-example|code-tabs)( *[^>\n]*)>( *)(?=\n)/g;
const blockTagPattern = /\n( *)<(\/?)(td|th|div|code-example|code-tabs|h\d+|p|tr)\b( *[^>\n]*)>( *)(?=\n)/g;
text = text.replace(blockTagPattern, '\n\n$1<$2$3$4>$5\n');
const multiLineCodePattern = /\n( *)```(\w*)( *)(?=\n)/g;