From 866238ffca6f3439331d52ac02343b2f9b0dfec4 Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Sun, 16 Apr 2017 16:56:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E8=AE=A2=E5=AE=8Ctoh2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/docs/ts/latest/tutorial/toh-pt2.jade | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/public/docs/ts/latest/tutorial/toh-pt2.jade b/public/docs/ts/latest/tutorial/toh-pt2.jade index ce842a6f81..7aeed8d124 100644 --- a/public/docs/ts/latest/tutorial/toh-pt2.jade +++ b/public/docs/ts/latest/tutorial/toh-pt2.jade @@ -42,7 +42,7 @@ include ../_util-fns :marked ## Keep the app transpiling and running - ### 让应用代码保持转译和运行 + ## 让应用代码保持转译和运行 Enter the following command in the terminal window: @@ -287,6 +287,7 @@ code-example(language="sh" class="code-shell"). 所以我们要把`hero`属性**替换**成`selectedHero`属性。 +makeExample('toh-2/ts/src/app/app.component.ts', 'selected-hero', 'src/app/app.component.ts (selectedHero)') + :marked The hero names should all be unselected before the user picks a hero, so you won't initialize the `selectedHero` as you did with `hero`. @@ -343,7 +344,7 @@ code-example(language="sh" class="code-shell"). :marked Don't forget the asterisk (`*`) in front of `ngIf`. - 记住,`ngIf`前导星号 (`*`) 是语法中的重要组成部分。 + 别忘了`ngIf`前的星号 (`*`)。 :marked The app no longer fails and the list of names displays again in the browser. @@ -412,10 +413,11 @@ code-example(language="sh" class="code-shell"). :marked Read more about the `[class]` binding in the [Template Syntax](../guide/template-syntax.html#ngClass "Template syntax: NgClass") guide. - 关于属性绑定的更多信息,见[模板语法](../guide/template-syntax.html#property-binding)。 + 关于`[class]`绑定的更多信息,参见[模板语法](../guide/template-syntax.html#ngClass "Template syntax: NgClass")。 :marked The final version of the `
  • ` looks like this: + +makeExample('toh-2/ts/src/app/app.component.1.html', 'class-selected-2', 'app.component.ts (styling each hero)')(format=".") :marked