fix: 精修翻译

This commit is contained in:
Zhicheng WANG 2019-01-29 21:46:46 +08:00
parent 0d11c7d06b
commit f50ff4ba43
4 changed files with 7 additions and 6 deletions

View File

@ -608,7 +608,7 @@ AngularJS 为模板提供了七十多个内置指令。
In AngularJS, the `ng-model` directive binds a form control to a property in the controller associated with the template. In AngularJS, the `ng-model` directive binds a form control to a property in the controller associated with the template.
This provides **two-way binding**, whereby any change made to the value in the view is synchronized with the model, and any change to the model is synchronized with the value in the view. This provides **two-way binding**, whereby any change made to the value in the view is synchronized with the model, and any change to the model is synchronized with the value in the view.
在 Angular1 中,`ng-model` 指令把一个表单控件绑定到了模板相关控制器的一个属性上。 在 AngularJS 中,`ng-model` 指令把一个表单控件绑定到了模板相关控制器的一个属性上。
这提供了**双向绑定**功能,因此,任何对视图中值的改动,都会同步到模型中,对模型的改动,也会同步到视图中。 这提供了**双向绑定**功能,因此,任何对视图中值的改动,都会同步到模型中,对模型的改动,也会同步到视图中。
</td> </td>
@ -648,7 +648,7 @@ AngularJS 为模板提供了七十多个内置指令。
In AngularJS, the `ng-repeat` directive repeats the associated DOM element In AngularJS, the `ng-repeat` directive repeats the associated DOM element
for each item in the specified collection. for each item in the specified collection.
在 Angular1 中,`ng-repeat` 指令会为指定集合中的每一个条目重复渲染相关的 DOM 元素。 在 AngularJS 中,`ng-repeat` 指令会为指定集合中的每一个条目重复渲染相关的 DOM 元素。
In this example, the table row (`<tr>`) element repeats for each movie object in the collection of movies. In this example, the table row (`<tr>`) element repeats for each movie object in the collection of movies.
@ -863,7 +863,7 @@ AngularJS 为模板提供了七十多个内置指令。
In AngularJS, the `ng-switch` directive swaps the contents of In AngularJS, the `ng-switch` directive swaps the contents of
an element by selecting one of the templates based on the current value of an expression. an element by selecting one of the templates based on the current value of an expression.
在 Angular1 中,`ng-switch` 指令根据一个表达式的当前值把元素的内容替换成几个模板之一。 在 AngularJS 中,`ng-switch` 指令根据一个表达式的当前值把元素的内容替换成几个模板之一。
In this example, if `favoriteHero` is not set, the template displays "Please enter ...". In this example, if `favoriteHero` is not set, the template displays "Please enter ...".
If `favoriteHero` is set, it checks the movie hero by calling a controller method. If `favoriteHero` is set, it checks the movie hero by calling a controller method.
@ -1421,7 +1421,7 @@ The Angular code is shown using TypeScript.
In AngularJS, you write the code for the model and methods in a controller function. In AngularJS, you write the code for the model and methods in a controller function.
在 Angular1 中,你在控制器函数中编写模型和方法的代码。 在 AngularJS 中,你在控制器函数中编写模型和方法的代码。
</td> </td>

View File

@ -4041,7 +4041,7 @@ This example resets the component's `providers` metadata.
The type parameter, `T`, is the kind of metadata you'd pass to the `@Component` decorator: The type parameter, `T`, is the kind of metadata you'd pass to the `@Component` decorator:
这个类型参数`T`,是你会传递给 `@Component` 装饰器的元数据的类型。 这个类型参数 `T` 就是你传给 `@Component` 装饰器的元数据:
<code-example format="." language="javascript"> <code-example format="." language="javascript">
selector?: string; selector?: string;

View File

@ -439,6 +439,7 @@ See [Upgrading from AngularJS](guide/upgrade) to learn about:
module each injectable belongs to, when calling `downgradeInjectable()`._ module each injectable belongs to, when calling `downgradeInjectable()`._
[让 Angular 的依赖可注入到 AngularJS 中](guide/upgrade#making-angular-dependencies-injectable-to-angularjs)。 [让 Angular 的依赖可注入到 AngularJS 中](guide/upgrade#making-angular-dependencies-injectable-to-angularjs)。
*注意:如果你正在降级多个模块,就要在调用 `downgradeInjectable()` 时为每个包含可注入对象的模块指定降级后的模块名。*
<div class="alert is-important"> <div class="alert is-important">

View File

@ -235,7 +235,7 @@ To automate that data flow, setup a two-way data binding between the `<input>` f
Refactor the details area in the `HeroesComponent` template so it looks like this: Refactor the details area in the `HeroesComponent` template so it looks like this:
把模板中的英雄名字重构成这样: 把模板中的英雄详情区重构成这样:
<code-example path="toh-pt1/src/app/heroes/heroes.component.1.html" region="name-input" header="src/app/heroes/heroes.component.html (HeroesComponent's template)" linenums="false"> <code-example path="toh-pt1/src/app/heroes/heroes.component.1.html" region="name-input" header="src/app/heroes/heroes.component.html (HeroesComponent's template)" linenums="false">