diff --git a/aio/content/guide/forms.md b/aio/content/guide/forms.md
index 0327ac0204..4e3e36db1f 100644
--- a/aio/content/guide/forms.md
+++ b/aio/content/guide/forms.md
@@ -25,33 +25,32 @@ This page shows you how to build a simple form from scratch. Along the way you'l
* Build an Angular form with a component and template.
- 用组件和模板构建 Angular 表单
-
+ 用组件和模板构建 Angular 表单
+
* Use `ngModel` to create two-way data bindings for reading and writing input-control values.
- 用`ngModel`创建双向数据绑定,以读取和写入输入控件的值
-
+ 用`ngModel`创建双向数据绑定,以读取和写入输入控件的值
+
* Track state changes and the validity of form controls.
- 跟踪状态的变化,并验证表单控件
-
+ 跟踪状态的变化,并验证表单控件
+
* Provide visual feedback using special CSS classes that track the state of the controls.
- 使用特殊的CSS类来跟踪控件的状态并给出视觉反馈
-
+ 使用特殊的CSS类来跟踪控件的状态并给出视觉反馈
+
* Display validation errors to users and enable/disable form controls.
- 向用户显示验证错误提示,以及启用/禁用表单控件
-
+ 向用户显示验证错误提示,以及启用/禁用表单控件
+
* Share information across HTML elements using template reference variables.
- 使用模板引用变量在 HTML 元素之间共享信息
+ 使用模板引用变量在 HTML 元素之间共享信息
You can run the in Stackblitz and download the code from there.
你可以在Plunker中运行,并且从那里下载代码。
-
{@a template-driven}
## Template-driven forms
@@ -63,14 +62,12 @@ the form-specific directives and techniques described in this page.
通常,使用 Angular [模板语法](guide/template-syntax)编写模板,结合本章所描述的表单专用指令和技术来构建表单。
-
You can also use a reactive (or model-driven) approach to build forms.
However, this page focuses on template-driven forms.
-你还可以使用响应式(也叫模型驱动)的方式来构建表单。不过本章中只介绍模板驱动表单。
-
+ 你还可以使用响应式(也叫模型驱动)的方式来构建表单。不过本章中只介绍模板驱动表单。
@@ -91,9 +88,10 @@ You'll learn to build a template-driven form that looks like this:
我们将学习构建如下的“模板驱动”表单:
-
+
+
The *Hero Employment Agency* uses this form to maintain personal information about heroes.
@@ -110,22 +108,21 @@ If you delete the hero name, the form displays a validation error in an attentio
如果删除了英雄的名字,表单就会用醒目的样式把验证错误显示出来。
-
-
+
+
+
Note that the *Submit* button is disabled, and the "required" bar to the left of the input control changes from green to red.
注意,提交按钮被禁用了,而且输入控件左侧的“必填”条从绿色变为了红色。
-
You can customize the colors and location of the "required" bar with standard CSS.
-稍后,会使用标准 CSS 来定制“必填”条的颜色和位置。
-
+ 稍后,会使用标准 CSS 来定制“必填”条的颜色和位置。
@@ -152,7 +149,7 @@ You'll build this form in small steps:
1. Add a `name` attribute to each form-input control.
往每个表单输入控件上添加`name`属性 (attribute)。
-
+
1. Add custom CSS to provide visual feedback.
添加自定义 CSS 来提供视觉反馈。
@@ -169,10 +166,9 @@ You'll build this form in small steps:
禁用此表单的提交按钮,直到表单变为有效。
-
## Setup
-## 搭建
+## 准备工作
Create a new project named angular-forms:
@@ -236,7 +232,7 @@ You can create a new hero like this:
可以这样创建新英雄:
-
+
@@ -280,19 +276,19 @@ Understanding this component requires only the Angular concepts covered in previ
* The code imports the Angular core library and the `Hero` model you just created.
- 这段代码导入了Angular核心库以及我们刚刚创建的`Hero`模型。
-
+ 这段代码导入了Angular核心库以及我们刚刚创建的`Hero`模型。
+
* The `@Component` selector value of "hero-form" means you can drop this form in a parent template with a `` tag.
- `@Component`选择器“hero-form”表示可以用``标签把这个表单放进父模板。
-
+ `@Component`选择器“hero-form”表示可以用``标签把这个表单放进父模板。
+
* The `templateUrl` property points to a separate file for the template HTML.
- `moduleId: module.id`属性设置了基地址,用于从相对模块路径加载`templateUrl`。
-
+ `moduleId: module.id`属性设置了基地址,用于从相对模块路径加载`templateUrl`。
+
* You defined dummy data for `model` and `powers`, as befits a demo.
- `templateUrl`属性指向一个独立的 HTML 模板文件。
+ `templateUrl`属性指向一个独立的 HTML 模板文件。
Down the road, you can inject a data service to get and save real data
or perhaps expose these properties as inputs and outputs
@@ -305,7 +301,7 @@ parent component. This is not a concern now and these future changes won't affec
* You added a `diagnostic` property to return a JSON representation of the model.
It'll help you see what you're doing during development; you've left yourself a cleanup note to discard it later.
- 我们添加一个`diagnostic`属性,以返回这个模型的 JSON 形式。在开发过程中,它用于调试,最后清理时会丢弃它。
+ 我们添加一个`diagnostic`属性,以返回这个模型的 JSON 形式。在开发过程中,它用于调试,最后清理时会丢弃它。
## Revise *app.module.ts*
@@ -332,7 +328,7 @@ Update it with the following:
There are two changes:
-
+
有三处更改
1. You import `FormsModule`.
@@ -340,7 +336,7 @@ Update it with the following:
导入`FormsModule`。
1. You add the `FormsModule` to the list of `imports` defined in the `@NgModule` decorator. This gives the application
-access to all of the template-driven forms features, including `ngModel`.
+ access to all of the template-driven forms features, including `ngModel`.
把`FormsModule`添加到`ngModule`装饰器的`imports`列表中,这样应用就能访问模板驱动表单的所有特性,包括`ngModel`。
@@ -354,7 +350,6 @@ access to all of the template-driven forms features, including `ngModel`.
如果某个组件、指令或管道是属于`imports`中所导入的某个模块的,那就_不能再_把它再声明到本模块的`declarations`数组中。
如果它是你自己写的,并且确实属于当前模块,*才应该*把它声明在`declarations`数组中。
-
## Revise *app.component.html*
@@ -367,7 +362,6 @@ access to all of the template-driven forms features, including `ngModel`.
Replace the contents of its template with the following:
-
把“快速上手”的版本内容替换成下列代码:
@@ -376,13 +370,12 @@ Replace the contents of its template with the following:
-
There are only two changes.
The `template` is simply the new element tag identified by the component's `selector` property.
This displays the hero form when the application component is loaded.
Don't forget to remove the `name` field from the class body as well.
-这里只做了两处修改。
+ 这里只做了两处修改。
`template`中只剩下这个新的元素标签,即组件的`selector`属性。这样当应用组件被加载时,就会显示这个英雄表单。
同样别忘了从类中移除了`name`字段。
@@ -392,9 +385,9 @@ Replace the contents of its template with the following:
## 创建初始 HTML 表单模板
-Create the template file with the following contents:
+Update the template file with the following contents:
-创建模板文件,内容如下:
+修改模板文件,内容如下:
@@ -418,14 +411,12 @@ You added a *Submit* button at the bottom with some classes on it for styling.
**我们还没有真正用到Angular**。没有绑定,没有额外的指令,只有布局。
-
In template driven forms, if you've imported `FormsModule`, you don't have to do anything
to the `
@@ -436,26 +427,22 @@ Bootstrap gives the form a little style.
`container`、`form-group`、`form-control`和`btn`类来自 [Twitter Bootstrap](http://getbootstrap.com/css/)。纯粹是装饰。
我们使用 Bootstrap 来美化表单。嘿,一点样式都没有的表单算个啥!
-
+
Angular forms don't require a style library
+
+ Angular 表单不需要任何样式库
+
-
-
-
- Angular 表单不需要任何样式库
-
-
Angular makes no use of the `container`, `form-group`, `form-control`, and `btn` classes or
the styles of any external library. Angular apps can use any CSS library or none at all.
-Angular 不需要`container`、`form-group`、`form-control`和`btn`类,
+ Angular 不需要`container`、`form-group`、`form-control`和`btn`类,
或者外部库的任何样式。Angular 应用可以使用任何 CSS 库…… ,或者啥都不用。
-
To add the stylesheet, open `styles.css` and add the following import line at the top:
@@ -485,7 +472,6 @@ a technique seen previously in the [Displaying Data](guide/displaying-data) page
Add the following HTML *immediately below* the *Alter Ego* group:
-
在 *Alter Ego* 的紧下方添加如下 HTML:
@@ -499,7 +485,6 @@ you display its name using the interpolation syntax.
列表中的每一项超能力都会渲染成`
Focus on the binding syntax: `[(ngModel)]="..."`.
@@ -567,7 +550,6 @@ You need one more addition to display the data. Declare
a template variable for the form. Update the `