请看改成参见,更书面化。

修订了一些词汇。
This commit is contained in:
Zhicheng Wang 2016-05-09 22:16:34 +08:00
parent 65a3fdb9f3
commit f0e75413c8
5 changed files with 31 additions and 32 deletions

View File

@ -49,7 +49,7 @@ include ../_util-fns
:marked :marked
**See the [live example](/resources/live-examples/cb-component-communication/ts/plnkr.html)**. **See the [live example](/resources/live-examples/cb-component-communication/ts/plnkr.html)**.
**请看[在线例子](/resources/live-examples/cb-component-communication/ts/plnkr.html)** **参见[在线例子](/resources/live-examples/cb-component-communication/ts/plnkr.html)**
.l-main-section .l-main-section
<a id="parent-to-child"></a> <a id="parent-to-child"></a>

View File

@ -70,7 +70,7 @@ include ../_util-fns
:marked :marked
**See the [live example](/resources/live-examples/cb-dependency-injection/ts/plnkr.html)** **See the [live example](/resources/live-examples/cb-dependency-injection/ts/plnkr.html)**
of the code supporting this cookbook. of the code supporting this cookbook.
获取本“食谱”的代码支持,**请看[在线例子](/resources/live-examples/cb-dependency-injection/ts/plnkr.html)**。 获取本“食谱”的代码支持,**参见[在线例子](/resources/live-examples/cb-dependency-injection/ts/plnkr.html)**。
.l-main-section .l-main-section
<a id="app-wide-dependencies"></a> <a id="app-wide-dependencies"></a>

View File

@ -40,7 +40,7 @@ include ../_util-fns
:marked :marked
**See the [live example](/resources/live-examples/cb-dynamic-form/ts/plnkr.html)**. **See the [live example](/resources/live-examples/cb-dynamic-form/ts/plnkr.html)**.
**请看[在线例子](/resources/live-examples/cb-dynamic-form/ts/plnkr.html)**. **参见[在线例子](/resources/live-examples/cb-dynamic-form/ts/plnkr.html)**.
.l-main-section .l-main-section
<a id="object-model"></a> <a id="object-model"></a>

View File

@ -9,7 +9,7 @@ a(id='top')
:marked :marked
**See the [live example](/resources/live-examples/cb-set-document-title/ts/plnkr.html)**. **See the [live example](/resources/live-examples/cb-set-document-title/ts/plnkr.html)**.
**请看[在线例子](/resources/live-examples/cb-set-document-title/ts/plnkr.html)**. **参见[在线例子](/resources/live-examples/cb-set-document-title/ts/plnkr.html)**.
.l-sub-section .l-sub-section
img(src='/resources/images/devguide/plunker-separate-window-button.png' alt="pop out the window" align="right" style="margin-right:-20px") img(src='/resources/images/devguide/plunker-separate-window-button.png' alt="pop out the window" align="right" style="margin-right:-20px")
:marked :marked

View File

@ -485,7 +485,7 @@ include _util-fns
Applications written in ES2015 or one of its dialects must be "[transpiled](#transpile)" Applications written in ES2015 or one of its dialects must be "[transpiled](#transpile)"
to ES5 JavaScript. to ES5 JavaScript.
目前几乎所有现代游览器都只支持上一版本“ECMAScript 5” 也就是ES5标准。使用ES2015或者其它兼容语言开发的应用程序都必须被编译“[transpiled](#transpile)”成ES5 JavaScript。 目前,几乎所有现代游览器都只支持上一版本“ECMAScript 5” 也就是ES5标准。使用ES2015或者其它兼容语言开发的应用程序都必须被“[转译](#transpile)”成ES5 JavaScript。
Angular 2 developers may choose to write in ES5 directly. Angular 2 developers may choose to write in ES5 directly.
@ -522,7 +522,7 @@ include _util-fns
Short hand for "ECMAScript 5", the version of JavaScript run by most modern browsers. Short hand for "ECMAScript 5", the version of JavaScript run by most modern browsers.
See [ECMAScript](#ecmascript). See [ECMAScript](#ecmascript).
“ECMAScript 5”的简写大部分现代浏览器使用的JavaScript版本。请看[ECMAScript](#ecmascript)。 “ECMAScript 5”的简写大部分现代浏览器使用的JavaScript版本。参见[ECMAScript](#ecmascript)。
// #enddocregion e2 // #enddocregion e2
// #docregion f-l // #docregion f-l
@ -540,7 +540,7 @@ include _util-fns
that can find a named "dependency" in its cache or create such a thing that can find a named "dependency" in its cache or create such a thing
with a registered [provider](#provider). with a registered [provider](#provider).
一个Angular[依赖注入系统](#dependency-injection)内部的对象,它可以在自己的内部缓存找到已点名的依赖或者利用一个注册过的[provider](#provider)创建一个依赖。 Angular[依赖注入系统](#dependency-injection)中的一个对象,它可以在自己的缓存中找到一个“有名字的依赖”或者利用一个已注册的[provider](#provider)创建这样的依赖。
:marked :marked
## Input ## Input
.l-sub-section .l-sub-section
@ -550,11 +550,11 @@ include _util-fns
Data values flow *into* this property from the data source identified Data values flow *into* this property from the data source identified
in the template expression to the right of the equal sign. in the template expression to the right of the equal sign.
一个指令属性:是[属性绑定Property Binding](guide/template-syntax.html#property-binding)的目标。数据值从处于模板表达式等号右边的数据源中,流入这个指令属性。 指令属性可以作为[属性绑定](guide/template-syntax.html#property-binding)的目标。数据值会从模板表达式等号右侧的数据源中,流入这个属性。
See the [Template Syntax](guide/template-syntax.html#inputs-outputs) chapter. See the [Template Syntax](guide/template-syntax.html#inputs-outputs) chapter.
请看[模板语法Template Syntax](guide/template-syntax.html#inputs-outputs)章 参见[模板语法Template Syntax](guide/template-syntax.html#inputs-outputs)章。
:marked :marked
## Interpolation ## Interpolation
@ -567,7 +567,7 @@ include _util-fns
before it is assigned to an element property before it is assigned to an element property
or displayed between element tags as in this example. or displayed between element tags as in this example.
一种[属性数据绑定Property Data Binding](#data-binding) 的方式:在双大括号中间的[模板表达式](#template-expression)被渲染成文本。在被指派给元素属性或者在元素标记中间显示之前,这些文本可能与傍边的文本先合并,请看下面的例子。 [属性数据绑定](#data-binding) 的格式之一:位于双大括号中的[模板表达式](#template-expression)会被渲染成文本。在被赋值给元素属性或者显示在元素标记中之前,这些文本可能先与周边的文本合并,参见下面的例子。
code-example(language="html" escape="html"). code-example(language="html" escape="html").
<label>My current hero is {{hero.name}}</label> <label>My current hero is {{hero.name}}</label>
@ -576,7 +576,7 @@ include _util-fns
Learn more about interpolation in the Learn more about interpolation in the
[Template Syntax](guide/template-syntax.html#interpolation) chapter. [Template Syntax](guide/template-syntax.html#interpolation) chapter.
从[模板语法Template Syntax](guide/template-syntax.html#interpolation)章节学习更多关于插值表达式的知识 要学习关于插值表达式的更多知识,参见[模板语法](guide/template-syntax.html#interpolation)一章
<a id="J"></a> <a id="J"></a>
@ -589,15 +589,15 @@ include _util-fns
:marked :marked
The practice of writing compound words or phrases such that each word is separated by a dash or hyphen (-). The practice of writing compound words or phrases such that each word is separated by a dash or hyphen (-).
使用中线来分割每个单词的编写复合词或短语的命名方法。 使用中线-)分隔每个单词来书写复合词或短语的命名方法。
Directive selectors and the root of filenames are often spelled in kebab-case. Examples include: `my-app` and the `hero-list.component.ts`. Directive selectors and the root of filenames are often spelled in kebab-case. Examples include: `my-app` and the `hero-list.component.ts`.
指令选择器和文件名等一般都用烤串命名法Kebab-case。比如`my-app`和`hero-list.component.ts`。 指令选择器和文件名等一般都用烤串命名法。比如`my-app`和`hero-list.component.ts`。
This form is also known as [dash-case](#dash-case). This form is also known as [dash-case](#dash-case).
这种命名法也被叫做[中线命名法dash-case](#dash-case) 这种格式也叫[中线命名法](#dash-case)。
<a id="L"></a> <a id="L"></a>
.l-main-section .l-main-section
@ -609,43 +609,42 @@ include _util-fns
[Directives](#directive) and [Components](#component) have a lifecycle [Directives](#directive) and [Components](#component) have a lifecycle
managed by Angular as it creates, updates and destroys them. managed by Angular as it creates, updates and destroys them.
[指令Directives](#directive)和[组件Components](#component)有生命周期由Angular在创建、更新和销毁它们的过程中管理。 [指令Directives](#directive)和[组件Components](#component)有生命周期,它们由Angular在创建、更新和销毁它们的过程中进行管理。
Developers can tap into key moments in that lifecycle by implementing Developers can tap into key moments in that lifecycle by implementing
one or more of the "Lifecycle Hook" interfaces. one or more of the "Lifecycle Hook" interfaces.
开发者可以通过实现一个或多个“生命周期钩子”接口,切入到这个生命周期的关键时间点 开发者可以通过实现一个或多个“生命周期钩子”接口,切入到生命周期的关键时间点。
Each interface has a single hook method whose name is the interface name prefixed with `ng`. Each interface has a single hook method whose name is the interface name prefixed with `ng`.
For example, the `OnInit` interface has a hook method names `ngOnInit`. For example, the `OnInit` interface has a hook method names `ngOnInit`.
每个接口有一个唯一的钩子方法方法,它的一般是接口的名字加前缀 `ng`。比如,`OnInit`接口的钩子类方法方法名字为 `ngOnInit`。 每个接口有一个钩子方法方法名一般是接口的名字加前缀 `ng`。比如,`OnInit`接口的钩子类的方法名为 `ngOnInit`。
Angular calls these hook methods in the following order: Angular calls these hook methods in the following order:
Angular会按照下面的顺序调用钩子类方法 Angular会按照下面的顺序调用钩子类方法
* `ngOnChanges` - called when an [input](#input)/[output](#output) binding values change * `ngOnChanges` - called when an [input](#input)/[output](#output) binding values change
* `ngOnInit` - after the first `ngOnChanges`
* `ngDoCheck` - developer's custom change detection
* `ngAfterContentInit` - after component content initialized
* `ngAfterContentChecked` - after every check of component content
* `ngAfterViewInit` - after component's view(s) are initialized
* `ngAfterViewChecked` - after every check of a component's view(s)
* `ngOnDestroy` - just before the directive is destroyed.
* `ngOnChanges` - 在[输入input](#input)/[输出output](#output)绑定的值变化的时候调用。 * `ngOnChanges` - 在[输入input](#input)/[输出output](#output)绑定的值变化的时候调用。
* `ngOnInit` - after the first `ngOnChanges`
* `ngOnInit` - 在第一个`ngOnChanges`后调用。 * `ngOnInit` - 在第一个`ngOnChanges`后调用。
* `ngDoCheck` - developer's custom change detection
* `ngDoCheck` - 开发者自定义变化监测器。 * `ngDoCheck` - 开发者自定义变化监测器。
* `ngAfterContentInit` - after component content initialized
* `ngAfterContentInit` - 在组件初始化以后调用。 * `ngAfterContentInit` - 在组件初始化以后调用。
* `ngAfterContentChecked` - after every check of component content
* `ngAfterContentChecked` - 在检查每个组件内容后调用。 * `ngAfterContentChecked` - 在检查每个组件内容后调用。
* `ngAfterViewInit` - after component's view(s) are initialized
* `ngAfterViewInit` - 在组件试图初始化后调用。 * `ngAfterViewInit` - 在组件试图初始化后调用。
* `ngAfterViewChecked` - after every check of a component's view(s)
* `ngAfterViewChecked` - 在检查每个组件试图后调用 * `ngAfterViewChecked` - 在检查每个组件试图后调用
* `ngOnDestroy` - just before the directive is destroyed.
* `ngOnDestroy` - 在指令销毁前调用。 * `ngOnDestroy` - 在指令销毁前调用。
Learn more in the [Lifecycle Hooks](guide/lifecycle-hooks.html) chapter. Learn more in the [Lifecycle Hooks](guide/lifecycle-hooks.html) chapter.
请看[生命周期钩子Lifecycle Hooks](guide/lifecycle-hooks.html)章 要了解更多,参见[生命周期钩子Lifecycle Hooks](guide/lifecycle-hooks.html)章。
// #enddocregion f-l // #enddocregion f-l
// #docregion m1 // #docregion m1
@ -669,7 +668,7 @@ include _util-fns
A typical module is a cohesive block of code dedicated to a single purpose. A typical module is a cohesive block of code dedicated to a single purpose.
一个典型的模块,是单一用途的代码块的凝聚 典型的模块,是具有单一用途的内聚代码块。
A module **exports** something of value in that code, typically one thing such as a class. A module **exports** something of value in that code, typically one thing such as a class.
A module that needs that thing, **imports** it. A module that needs that thing, **imports** it.
@ -681,7 +680,7 @@ include _util-fns
is based on the [ES2015](#es2015) module standard is based on the [ES2015](#es2015) module standard
described [here](http://www.2ality.com/2014/09/es6-modules-final.html). described [here](http://www.2ality.com/2014/09/es6-modules-final.html).
Angular的模块结构和输出/导入语法是基于[ES2015](#es2015)模块标准上的,请看[这里](http://www.2ality.com/2014/09/es6-modules-final.html). Angular的模块结构和输出/导入语法是基于[ES2015](#es2015)模块标准的,参见[这里](http://www.2ality.com/2014/09/es6-modules-final.html).
An application that adheres to this standard requires a module loader to An application that adheres to this standard requires a module loader to
load modules on request and resolve inter-module dependencies. load modules on request and resolve inter-module dependencies.
@ -729,7 +728,7 @@ include _util-fns
See the [Template Syntax](guide/template-syntax.html#inputs-outputs) chapter. See the [Template Syntax](guide/template-syntax.html#inputs-outputs) chapter.
请看[模板语法Template Syntax](guide/template-syntax.html#inputs-outputs)章节。 参见[模板语法Template Syntax](guide/template-syntax.html#inputs-outputs)章节。
.l-main-section .l-main-section
<a id="P"></a> <a id="P"></a>
@ -793,7 +792,7 @@ include _util-fns
See [Dependency Injection](#dependency-injection) chapter to learn more. See [Dependency Injection](#dependency-injection) chapter to learn more.
还有其它一些方法建立Token和方剂。 还有其它一些方法建立Token和方剂。
请看[依赖注入Dependency Injection](#dependency-injection)以获取更多信息。 参见[依赖注入Dependency Injection](#dependency-injection)以获取更多信息。
.l-main-section .l-main-section
<a id="Q"></a> <a id="Q"></a>