diff --git a/public/docs/ts/latest/cookbook/component-communication.jade b/public/docs/ts/latest/cookbook/component-communication.jade
index 885157ae3f..160b78c314 100644
--- a/public/docs/ts/latest/cookbook/component-communication.jade
+++ b/public/docs/ts/latest/cookbook/component-communication.jade
@@ -105,7 +105,7 @@ figure.image-display
Use an input property setter to intercept and act upon a value from the parent.
- 使用一个Input属性setter,在父级监听子级属性,并对属性值变化采取行动。
+ 使用一个Input属性setter,在父级拦截子级属性,并对属性值变化采取行动。
The setter of the `name` input property in the child `NameChildComponent`
trims the whitespace from a name and replaces an empty value with default text.
@@ -152,7 +152,7 @@ figure.image-display
:marked
May prefer this approach to the property setter when watching multiple, interacting input properties.
- 当监听多个互动Input属性的时候,本方法比属性setter更合适。
+ 当监视多个互动Input属性的时候,本方法比属性setter更合适。
Learn about `ngOnChanges` in the [LifeCycle Hooks](../guide/lifecycle-hooks.html) chapter.
diff --git a/public/docs/ts/latest/glossary.jade b/public/docs/ts/latest/glossary.jade
index 775535b8f8..d9737ab318 100644
--- a/public/docs/ts/latest/glossary.jade
+++ b/public/docs/ts/latest/glossary.jade
@@ -405,7 +405,7 @@ include _util-fns
is when we [bootstrap](#bootstrap) the application.
There are other opportunities to register as well.
- Angular会为每个注册器注册很多自己的内置Provider。我们也可以注册自己的Provider。通常注册Provider的最佳时间是在应用程序开始[引导](#bootstrap)的时候。
+ Angular会为每个注册器注册很多自己的内建Provider。我们也可以注册自己的Provider。通常注册Provider的最佳时间是在应用程序开始[引导](#bootstrap)的时候。
当然,我们也有其它很多机会注册Provider。
Learn more in the [Dependency Injection](guide/dependency-injection.html) chapter.
@@ -567,7 +567,7 @@ include _util-fns
before it is assigned to an element property
or displayed between element tags as in this example.
- [属性数据绑定](#data-binding) 的格式之一:位于双大括号中的[模板表达式](#template-expression)会被渲染成文本。在被赋值给元素属性或者显示在元素标记中之前,这些文本可能先与周边的文本合并,参见下面的例子。
+ [属性数据绑定](#data-binding) 的形式之一:位于双大括号中的[模板表达式](#template-expression)会被渲染成文本。在被赋值给元素属性或者显示在元素标签中之前,这些文本可能先与周边的文本合并,参见下面的例子。
code-example(language="html" escape="html").
@@ -597,7 +597,7 @@ include _util-fns
This form is also known as [dash-case](#dash-case).
- 这种格式也叫[中线命名法](#dash-case)。
+ 这种形式也叫[中线命名法](#dash-case)。
.l-main-section
@@ -834,7 +834,7 @@ include _util-fns
It likely has anchor tags or buttons with `RouterLink` directives that users can click to navigate.
- 它很大可能还会有一些有`RouterLink`指令的锚标记或按钮,用户可以用来点击导航。
+ 它很大可能还会有一些有`RouterLink`指令的a标签或按钮,用户可以用来点击导航。
.l-main-section
diff --git a/public/docs/ts/latest/guide/architecture.jade b/public/docs/ts/latest/guide/architecture.jade
index de9b63b02a..065c9a5c62 100644
--- a/public/docs/ts/latest/guide/architecture.jade
+++ b/public/docs/ts/latest/guide/architecture.jade
@@ -568,7 +568,7 @@ figure
We see two built-in structural directives at play in our [example](#template) template:
- 我们在[范例](#template)模板中会看到两个内置的结构型指令。
+ 我们在[范例](#template)模板中会看到两个内建的结构型指令。
+makeExample('architecture/ts/app/hero-list.component.1.html', 'structural')(format=".")
:marked
* [`*ngFor`](displaying-data.html#ngFor) tells Angular to stamp out one `
` per hero in the `heroes` list.
diff --git a/public/docs/ts/latest/guide/displaying-data.jade b/public/docs/ts/latest/guide/displaying-data.jade
index 04e0d0a695..37ec45a530 100644
--- a/public/docs/ts/latest/guide/displaying-data.jade
+++ b/public/docs/ts/latest/guide/displaying-data.jade
@@ -118,7 +118,7 @@ include ../_quickstart_repo
We're ready to see changes in a running app by firing up the npm script that both compiles and serves our applications
while watching for changes.
- 通过运行npm脚本(它能编译并启动一个能监听变化的服务器),我们能看到运行中的应用发生的变化。
+ 通过运行npm脚本(它能编译并启动一个能监视变化的服务器),我们能看到运行中的应用发生的变化。
code-example(format="").
npm start
:marked
diff --git a/public/docs/ts/latest/guide/forms.jade b/public/docs/ts/latest/guide/forms.jade
index cdc6fb4998..88cc356b34 100644
--- a/public/docs/ts/latest/guide/forms.jade
+++ b/public/docs/ts/latest/guide/forms.jade
@@ -948,7 +948,7 @@ figure.image-display
control* is valid.
`NgForm`指令使用额外的特性扩充了`form`元素。
- 它保存我们通过`ngControl`属性为各个元素创建的控件类,并且监听它们的属性变化,包括有效性。
+ 它保存我们通过`ngControl`属性为各个元素创建的控件类,并且监视它们的属性变化,包括有效性。
它还有自己的`valid`属性,只有当 *每一个被包含的控件* 都有效时,它才有效。
:marked
diff --git a/public/docs/ts/latest/guide/style-guide.jade b/public/docs/ts/latest/guide/style-guide.jade
index ace393ad61..276e8e00d6 100644
--- a/public/docs/ts/latest/guide/style-guide.jade
+++ b/public/docs/ts/latest/guide/style-guide.jade
@@ -347,11 +347,7 @@ a(href="#toc") 回到顶部
.s-rule.do
:marked
**Do** use consistent names for all assets named after what they represent.
-<<<<<<< HEAD
**做** 为所有东西使用统一的命名:以它们所代表的东西命名
-=======
- **做** 为所有财产的使用统一的命名:以它们所代表的东西命名
->>>>>>> f0e75413c854b8966c506c7c351339c9f5e98512
.s-rule.do
:marked
diff --git a/public/docs/ts/latest/guide/template-syntax.jade b/public/docs/ts/latest/guide/template-syntax.jade
index 3cda50b68b..092860e576 100644
--- a/public/docs/ts/latest/guide/template-syntax.jade
+++ b/public/docs/ts/latest/guide/template-syntax.jade
@@ -33,7 +33,7 @@ include ../_util-fns
* [Two-way data binding with `NgModel`](#ngModel)
* [使用`NgModel`进行双向数据绑定](#ngModel)
* [Built-in directives](#directives)
- * [内置指令](#directives)
+ * [内建指令](#directives)
* [NgClass](#ngClass)
* [NgStyle](#ngStyle)
* [NgIf](#ngIf)
@@ -1471,7 +1471,7 @@ code-example(format="", language="html").
:marked
Alternatively, we can use the canonical prefix form:
- 另外,我们也可以使用规范前缀格式:
+ 另外,我们也可以使用规范前缀形式:
// #enddocregion ngModel-2
+makeExample('template-syntax/ts/app/app.component.html', 'NgModel-2')(format=".")
// #docregion ngModel-3
@@ -2019,7 +2019,7 @@ figure.image-display
## *与<template*>
When we reviewed the `NgFor`, `NgIf`, and `NgSwitch` built-in directives, we called out an oddity of the syntax: the asterisk (`*`) that appears before the directive names.
- 当我们审视`NgFor`、`NgIf`和`NgSwitch`内置指令时,我们使用了古怪的语法:出现在指令名称前面的星号(`*`)。
+ 当我们审视`NgFor`、`NgIf`和`NgSwitch`内建指令时,我们使用了古怪的语法:出现在指令名称前面的星号(`*`)。
The `*` is a bit of syntactic sugar that makes it easier to read and write directives that modify HTML layout
with the help of templates.
diff --git a/public/docs/ts/latest/quickstart.jade b/public/docs/ts/latest/quickstart.jade
index bb240304ee..23b67b46fd 100644
--- a/public/docs/ts/latest/quickstart.jade
+++ b/public/docs/ts/latest/quickstart.jade
@@ -192,7 +192,7 @@ a(id="package-json")
* `npm start` - run the compiler and a server at the same time, both in "watch mode"
- * `npm start` - 同时运行编译器和一个服务器,并且都开启"监听模式"
+ * `npm start` - 同时运行编译器和一个服务器,并且都开启"监视模式"
* `npm run tsc` - run the TypeScript compiler once
@@ -201,7 +201,7 @@ a(id="package-json")
* `npm run tsc:w` - run the TypeScript compiler in watch mode;
the process keeps running, awaiting changes to TypeScript files and re-compiling when it sees them.
- * `npm run tsc:w` - 在监听模式运行TypeScript编译器:
+ * `npm run tsc:w` - 在监视模式运行TypeScript编译器:
进程持续运行,并等待TypeScript文件发生变化,一旦变化就重新编译它。
* `npm run lite` - run the lite-server,
@@ -390,7 +390,7 @@ a(id="app-component")
written in an enhanced form of HTML that tells Angular how to render this component's view.
**template**字段指定了此组件的模板。
- 它用一种增强的HTML格式写成,用来告诉Angular如何渲染此组件的视图。
+ 它用一种增强的HTML形式写成,用来告诉Angular如何渲染此组件的视图。
>Our template is a single line of HTML announcing "*My First Angular App*".
@@ -578,7 +578,7 @@ code-example(format="").
when working with observables.
We added the library here in QuickStart so we don't forget later.//TODO this subsection needs to be moved for when we cover the systemjs.config.js
- 我们的QuickStart不会用到响应式扩展,但是大量的应用需要它们来提供Observable(译注:响应式编程的核心特性,指监听数据的变更以便做出响应)特性。
+ 我们的QuickStart不会用到响应式扩展,但是大量的应用需要它们来提供Observable(译注:响应式编程的核心特性,指监视数据的变更以便做出响应)特性。
我们把它加到QuickStart中,以免将来忘了。//TODO 当我们覆盖到systemjs.config.js时,我们得把这些内容移过去。
:marked
@@ -760,7 +760,7 @@ figure.image-display
They should detect the change, recompile the TypeScript into JavaScript,
refresh the browser, and display the revised message.
- TypeScript编译器和`lite-server`都在监听。
+ TypeScript编译器和`lite-server`都在监视。
它们会检测到文件的变化,重新把这个TypeScript文件编译成JavaScript文件,刷新浏览器,并且显示修改过的消息。
It's a nifty way to develop an application!
diff --git a/public/docs/ts/latest/tutorial/index.jade b/public/docs/ts/latest/tutorial/index.jade
index e394d340bd..e08eb54a9f 100644
--- a/public/docs/ts/latest/tutorial/index.jade
+++ b/public/docs/ts/latest/tutorial/index.jade
@@ -8,14 +8,14 @@ include ../_util-fns
Our grand plan is to build an app to help a staffing agency manage its stable of heroes.
Even heroes need to find work.
- 我们的终极计划是构建一个程序,来帮助职业介绍所管理英雄选择器(译注:比如WoW登录后看到的那个列表就是“英雄选择器”)。毕竟,英雄们也得养家糊口嘛!
+ 我们的终极计划是构建一个程序,来帮助职业介绍所管理英雄围栏(译注:比如WoW登录后看到的那个列表就是“英雄围栏”)。毕竟,英雄们也得养家糊口嘛!
Of course we'll only make a little progress in this tutorial. What we do build will
have many of the features we expect to find in a full-blown, data-driven application: acquiring and displaying
a list of heroes, editing a selected hero's detail, and navigating among different
views of heroic data.
- 当然,在这个教程中,我们只完成一小步。我们这次构建的应用将用到很多对特性:获得并显示英雄列表,编辑所选英雄的详情,并在英雄数据的多个视图之间建立导航。这些特性,在全面、数据驱动的应用中经常见到。
+ 当然,在这个教程中,我们只完成一小步。我们这次构建的应用会涉及很多特性:获得并显示英雄列表,编辑所选英雄的详情,并在英雄数据的多个视图之间建立导航。这些特性,在成熟的、数据驱动的应用中经常见到。
The Tour of Heroes covers the core fundamentals of Angular.
We’ll use built-in directives to show/hide elements and display lists of hero data.
@@ -28,7 +28,7 @@ include ../_util-fns
这个《英雄指南》覆盖了Angular的核心原理。
我们将使用内建指令来显示/隐藏元素,并且显示英雄数据的列表。
我们将创建一个组件来显示英雄的详情,另一个组件则用来显示英雄列表。
- 我们将对只读数据使用单向数据绑定。我们将添加一些可编辑字段,并使用双向数据绑定更新模型。
+ 我们将对只读数据使用单向数据绑定。我们将添加一些可编辑字段,并通过双向数据绑定更新模型。
我们将把组件上的方法绑定到用户事件上,比如按键和点击。
我们将学习从主列表视图中选择一个英雄,然后在详情视图中编辑它。
我们将通过管道对数据进行格式化。
@@ -40,8 +40,8 @@ include ../_util-fns
We'll be covering a lot of ground at an introductory level but we’ll find plenty of links
to chapters with greater depth.
- 我们将学习足够的Angular核心技术,以尝试起步,并建立信心 —— 证明Angular确实能做到我们需要它做的这些。
- 我们将覆盖大部分“简介级”知识,但是我们还会放上大量链接,指向更深入的章节。
+ 我们将学习足够的Angular核心技术,来作为起步,并建立信心 —— 证明Angular确实能做到我们想让它做的。
+ 虽然我们将覆盖大部分“简介级”知识,但还是会放上大量链接,指向更深入的章节。
// #enddocregion intro
@@ -59,7 +59,7 @@ include ../_util-fns
Here's a visual idea of where we're going in this tour, beginning with the "Dashboard"
view and our most heroic heroes:
- 在这个教程中,还有一些可视化思想。放一个“仪表盘(Dashboard)”视图,来显示我们最勇敢的英雄。
+ 在这个教程中,还引入了一些可视化思想:放一个“仪表盘(Dashboard)”视图,来展示我们最勇敢的英雄。
figure.image-display
img(src='/resources/images/devguide/toh/heroes-dashboard-1.png' alt="英雄仪表盘的输出")
@@ -69,7 +69,7 @@ figure.image-display
We could click them to navigate between this Dashboard and a Heroes view.
这个仪表盘中有两个链接:“仪表盘”和“英雄”。
- 我们将点击它们,以便在“仪表盘”和“英雄”视图之间导航。
+ 我们将点击它们在“仪表盘”和“英雄”视图之间导航。
Instead we click the dashboard hero named "Magneta" and the router takes us to a "Hero Details" view
of that hero where we can change the hero's name.
@@ -94,7 +94,7 @@ figure.image-display
:marked
We click a different hero and the readonly mini-detail beneath the list reflects our new choice.
- 当我们点击另一位英雄时,一个只读的“微型视图”会显示在列表下方,以反应我们的选择。
+ 当我们点击另一位英雄时,一个只读的“微型视图”会显示在列表下方,以体现我们的选择。
We click the "View Details" button to drill into the
editable details of our selected hero.
@@ -103,7 +103,7 @@ figure.image-display
The following diagram captures all of our navigation options.
- 下列图标汇总了我们的所有可选导航路径。
+ 下面这个图汇总了我们所有可能的导航路径。
figure.image-display
img(src='/resources/images/devguide/toh/nav-diagram.png' alt="查看导航")
@@ -111,7 +111,7 @@ figure.image-display
:marked
Here's our app in action
- 下面是我们应用的所有动作
+ 下图演示了我们应用中的所有操作。
figure.image-display
img(src='/resources/images/devguide/toh/toh-anim.gif' alt="英雄指南的所有动作")
@@ -125,12 +125,12 @@ figure.image-display
We'll motivate each step with a requirement that we've
met in countless applications. Everything has a reason.
- 我们将共同一步步的构建出《英雄指南》。
- 我们将通过与无数应用中类似的需求,驱动我们走向下一步。任何事,都会有理由。
+ 让我们一起,一步步构建出《英雄指南》。
+ 我们将让和无数应用类似的需求,驱动我们走向下一步。任何事,都会有理由。
And we’ll meet many of the core fundamentals of Angular along the way.
- 这一路,我们将遇到Angular的大量核心原则。
+ 这一路上,我们将遇到很多Angular核心原理。
[Let's get started!](./toh-pt1.html)
diff --git a/public/docs/ts/latest/tutorial/toh-pt1.jade b/public/docs/ts/latest/tutorial/toh-pt1.jade
index 3333d5cdcd..f713e6250b 100644
--- a/public/docs/ts/latest/tutorial/toh-pt1.jade
+++ b/public/docs/ts/latest/tutorial/toh-pt1.jade
@@ -6,7 +6,7 @@ include ../_util-fns
Every story starts somewhere. Our story starts where the [QuickStart](../quickstart.html) ends.
- 每个故事,都有一个起点。而我们的故事则开始于[QuickStart](../quickstart.html)的结尾处。
+ 每一个故事,都有一个起点。而我们的故事则开始于[QuickStart](../quickstart.html)的结尾处。
[Run the live example for part 1](/resources/live-examples/toh-1/ts/plnkr.html)
@@ -15,7 +15,7 @@ include ../_util-fns
Create a folder called `angular2-tour-of-heroes` and follow the [QuickStart](../quickstart.html) steps
which provide the prerequisites, the folder structure, and the core files for our Tour of Heroes.
- 创建一个名为`angular2-tour-of-heroes`的文件夹,并且遵循[QuickStart](../quickstart.html)中的步骤初始化它 —— 环境准备、目录结构,以及我们《英雄指南》的核心文件。
+ 创建一个名为`angular2-tour-of-heroes`的文件夹,并且遵循[QuickStart](../quickstart.html)中的步骤初始化它 —— 环境准备、目录结构,并放进我们《英雄指南》的核心文件。
include ../_quickstart_repo
:marked
@@ -52,7 +52,7 @@ code-example(format="" language="bash").
This command runs the compiler in watch mode, starts the server, launches the app in a browser,
and keeps the app running while we continue to build the Tour of Heroes.
- 这个命令会在监视模式下运行编译器,启动开发服务器,在浏览器中启动我们的应用,并且在我们构建《英雄指南》的时候让应用得以持续运行。
+ 这个命令会在监视模式下运行编译器,启动开发服务器,在浏览器中启动我们的应用,并在我们构建《英雄指南》的时候让应用得以持续运行。
.l-main-section
:marked
@@ -65,7 +65,7 @@ code-example(format="" language="bash").
Let's add two properties to our `AppComponent`, a `title` property for the application name and a `hero` property
for a hero named "Windstorm".
- 让我们给`AppComponent`添加两个属性:`title`属性表示应用的名字,而`hero`属性表示一个名叫“Windstorm”的英雄。
+ 我们来为`AppComponent`添加两个属性:`title`属性表示应用的名字,而`hero`属性表示一个名叫“Windstorm”的英雄。
+makeExample('toh-1/ts-snippets/app.component.snippets.pt1.ts', 'app-component-1', 'app.component.ts (AppComponent类)')(format=".")
@@ -84,13 +84,13 @@ code-example(format="" language="bash").
The double curly braces tell our app to read the `title` and `hero` properties from the component and render them.
This is the "interpolation" form of one-way data binding.
- 这里的“双大括号”会告诉应用:从组件中读取`title`和`hero`属性,并且渲染它们。这就是单向数据绑定的“插值表达式”格式。
+ 这里的“双大括号”会告诉应用:从组件中读取`title`和`hero`属性,并且渲染它们。这就是单向数据绑定的“插值表达式”形式。
.l-sub-section
:marked
Learn more about interpolation in the [Displaying Data chapter](../guide/displaying-data.html).
- 想了解插值表达式的更多知识,参阅[“显示数据”一章](../guide/displaying-data.html)。
+ 要了解插值表达式的更多知识,参阅[“显示数据”一章](../guide/displaying-data.html)。
:marked
### Hero object
### Hero对象
@@ -98,7 +98,7 @@ code-example(format="" language="bash").
At the moment, our hero is just a name. Our hero needs more properties.
Let's convert the `hero` from a literal string to a class.
- 此时此刻,我们的英雄还只有一个名字。显然,我们的英雄应该有更多的属性。
+ 此时此刻,我们的英雄还只有一个名字。显然,他/她应该有更多属性。
让我们把`hero`从一个字符串字面量换成一个类。
Create a `Hero` class with `id` and `name` properties.
@@ -107,36 +107,36 @@ code-example(format="" language="bash").
创建一个`Hero`类,它具有`id`和`name`属性。
现在,把下列代码放在`app.component.ts`的顶部,仅次于import语句。
-+makeExample('toh-1/ts/app/app.component.ts', 'hero-class-1', 'app.component.ts (Hero class)')(format=".")
++makeExample('toh-1/ts/app/app.component.ts', 'hero-class-1', 'app.component.ts (Hero类)')(format=".")
:marked
Now that we have a `Hero` class, let’s refactor our component’s `hero` property to be of type `Hero`.
Then initialize it with an id of `1` and the name, "Windstorm".
现在,有了一个`Hero`类,我们就要把组件`hero`属性的类型换成`Hero`了。
- 然后把`1`作为id、把“Windstorm”作为名字,初始化它。
+ 然后以`1`为id、以“Windstorm”为名字,初始化它。
-+makeExample('toh-1/ts-snippets/app.component.snippets.pt1.ts', 'hero-property-1', 'app.component.ts (Hero属性)')(format=".")
++makeExample('toh-1/ts-snippets/app.component.snippets.pt1.ts', 'hero-property-1', 'app.component.ts (hero属性)')(format=".")
:marked
Because we changed the hero from a string to an object,
we update the binding in the template to refer to the hero’s `name` property.
- 我们把hero从一个字符串换成了对象,于是我们也得更新模板中的绑定表达式,来引用hero的`name`属性。
+ 我们把`hero`从一个字符串换成了对象,所以也得更新模板中的绑定表达式,来引用`hero`的`name`属性。
+makeExample('toh-1/ts-snippets/app.component.snippets.pt1.ts', 'show-hero-2')
:marked
The browser refreshes and continues to display our hero’s name.
- 浏览器自动刷新,并且继续显示这位英雄的名字。
+ 浏览器自动刷新,并继续显示这位英雄的名字。
### Adding more HTML
### 添加更多的HTML
Displaying a name is good, but we want to see all of our hero’s properties.
We’ll add a `
` for our hero’s `id` property and another `
` for our hero’s `name`.
- 能显示名字就算不错了,但是我们还想看到我们这位英雄的所有属性。
- 我们将添加一个`
`来显示英雄的`name`属性。
+makeExample('toh-1/ts-snippets/app.component.snippets.pt1.ts', 'show-hero-properties')
:marked
@@ -153,13 +153,13 @@ code-example(format="" language="bash").
let’s take advantage of the template strings feature
in ES2015 and TypeScript to maintain our sanity.
- 我们可以通过字符串加法来制作更可读的模板,但这样仍然太难看了 —— 难于阅读,容易出现拼写错误。
- 这样不行!我们要借助ES2015和TypeScript提供的模板字符串来保持清醒。
+ 我们可以通过字符串加法来制作更可读的模板,但这样仍然太难看了 —— 难于阅读,容易拼错。
+ 这样不行!我们要借助ES2015和TypeScript提供的模板字符串来保持清爽。
Change the quotes around the template to back-ticks and
put the `
`, `
` and `
` elements on their own lines.
- 把模板的双引号改成反引号,并且让`
`, `
` 和 `
`标签各占一行。
+ 把模板的双引号改成反引号,并且让`
`,`
`和`
`标签各占一行。
+makeExample('toh-1/ts-snippets/app.component.snippets.pt1.ts', 'multi-line-strings', 'app.component.ts (AppComponent的 模板)')
@@ -174,9 +174,9 @@ code-example(format="" language="bash").
Everything between the back-ticks at the beginning and end of the template
is part of a single template string.
- **小心!**反引号(`)看起来很像单引号('),但它们是截然不同的字符。
- 反引号能够做的可不只是标记字符串边界。
- 在这里,我们只用它来把我们的模板变成多行的,而不涉及更多用途。
+ **小心!**反引号(`)虽然看起来很像单引号('),但它们是截然不同的字符。
+ 反引号能做的可不仅仅是标记字符串的边界。
+ 在这里,我们只用它来把我们的模板变成多行的,而没有涉及更多用途。
所有被反引号引起来的部分,都是一个单一模板字符串的一部分。
.l-main-section
@@ -190,7 +190,7 @@ code-example(format="" language="bash").
Refactor the hero name `