fix: 让表达更清晰

This commit is contained in:
Zhicheng WANG 2018-12-17 11:17:59 +08:00
parent 697df41b5e
commit c0fbe8ba84
1 changed files with 1 additions and 1 deletions

View File

@ -2453,7 +2453,7 @@ Here it is referenced first in an interpolation
and then passed in a binding to the `hero` property of the `<hero-detail>` component. and then passed in a binding to the `hero` property of the `<hero-detail>` component.
你可以在 `ngFor` 的宿主元素(及其子元素)中引用模板输入变量 `hero`,从而访问该英雄的属性。 你可以在 `ngFor` 的宿主元素(及其子元素)中引用模板输入变量 `hero`,从而访问该英雄的属性。
这里它首先在一个插值表达式中被引用到,然后通过一个绑定把它传给了 `<hero-detail>` 组件的 `hero` 属性。 这里的第一个语句示范了如何在一个插值表达式中引用它,第二个语句则示范了如何用一个输入绑定把它传给 `<hero-detail>` 组件的 `hero` 属性。
<code-example path="template-syntax/src/app/app.component.html" region="NgFor-1-2" header="src/app/app.component.html" linenums="false"> <code-example path="template-syntax/src/app/app.component.html" region="NgFor-1-2" header="src/app/app.component.html" linenums="false">
</code-example> </code-example>