From 1a6678597098c1955bdd50de965b31cef9914d54 Mon Sep 17 00:00:00 2001 From: "Zhimin YE (Rex)" Date: Wed, 1 Jun 2016 16:52:34 +0100 Subject: [PATCH] template-syntax review is done. --- .../docs/ts/latest/guide/template-syntax.jade | 45 +++++++++---------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/public/docs/ts/latest/guide/template-syntax.jade b/public/docs/ts/latest/guide/template-syntax.jade index 29fe1f1f82..e5f9cef707 100644 --- a/public/docs/ts/latest/guide/template-syntax.jade +++ b/public/docs/ts/latest/guide/template-syntax.jade @@ -1341,7 +1341,7 @@ block style-property-name-dart-diff When the user clicks *delete*, the component invokes the `delete()` method which tells the `EventEmitter` to emit a `Hero` object. - 组件定义了一个`deleteRequest`属性,它是一个`EventEmitter`实例。(译注:`deleteRequest`属性是导出Output属性,是组件与父级组件交互的主要方式之一。参见[父组件监听子组件的事件](docs/ts/latest/cookbook/component-communication.html#!#child-to-parent)。我们需要用`@Output()`来装饰它,或者把它添加到组件元数据的`outputs`数组中,它才能在父级组件可见。) + 组件定义了一个`deleteRequest`属性,它是一个`EventEmitter`实例。(译注:`deleteRequest`属性是导出Output属性,是组件与父级组件交互的主要方式之一。参见[输入和输出属性](#input-and-output-properties)和[父组件监听子组件的事件](docs/ts/latest/cookbook/component-communication.html#!#child-to-parent)。我们需要用`@Output()`来装饰它,或者把它添加到组件元数据的`outputs`数组中,它才能在父级组件可见。) 当用户点击*删除*时,组件会调用`delete()`方法,这个方法告诉`EventEmitter`,发出一个`Hero`对象。 Now imagine a hosting parent component that binds to the `HeroDetailComponent`'s `deleteRequest` event. @@ -1913,7 +1913,7 @@ figure.image-display .l-main-section :marked ## `*` and <template> - ## `*`与<template*> + ## `*`与<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`内建指令时,我们使用了一种古怪的语法:出现在指令名称前面的星号(`*`)。 @@ -1923,7 +1923,7 @@ figure.image-display `NgFor`, `NgIf`, and `NgSwitch` all add and remove element subtrees that are wrapped in `