From db9d68ced7f8edfbcdf734499ca075a24af08872 Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Mon, 16 May 2016 21:34:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=BA=E7=A1=80=E7=9F=A5=E8=AF=86-=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=20=E4=B8=80=E5=AE=A1=E5=AE=8C=E6=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/docs/ts/latest/guide/architecture.jade | 2 +- .../docs/ts/latest/guide/template-syntax.jade | 598 +++++++++--------- 2 files changed, 291 insertions(+), 309 deletions(-) diff --git a/public/docs/ts/latest/guide/architecture.jade b/public/docs/ts/latest/guide/architecture.jade index ea6bbcf028..aa420fb46e 100644 --- a/public/docs/ts/latest/guide/architecture.jade +++ b/public/docs/ts/latest/guide/architecture.jade @@ -561,7 +561,7 @@ figure They tend to appear within an element tag like attributes, sometimes by name but more often as the target of an assignment or a binding. - 它们往往像Attribute一样出现在元素标签中,偶尔会以名字的形式出现(译注:如``,表示把hero-detail组件的name属性赋值为"superman",并且永不再变 —— 也就是一次性赋值,但不绑定),但多数时候还是作为赋值目标或绑定目标。 + 它们往往像Attribute一样出现在元素标签中,偶尔会以名字的形式出现(参见[一次性绑定](./template-syntax.html#one-time-initialization)),但多数时候还是作为赋值目标或绑定目标。 **Structural** directives alter layout by adding, removing, and replacing elements in DOM. diff --git a/public/docs/ts/latest/guide/template-syntax.jade b/public/docs/ts/latest/guide/template-syntax.jade index 291adb4ada..b6f5e6b9fa 100644 --- a/public/docs/ts/latest/guide/template-syntax.jade +++ b/public/docs/ts/latest/guide/template-syntax.jade @@ -9,12 +9,13 @@ include ../_util-fns Many of us are familiar with the component/template duality from our experience with model-view-controller (MVC) or model-view-viewmodel (MVVM). In Angular, the component plays the part of the controller/viewmodel, and the template represents the view. 从使用模型-视图-控制器(MVC)或模型-视图-视图模型(MVVM)的经验中,很多用户都熟悉了组件/模板这两个概念。 - 在Angular中,组件扮演着控制器部分或视图模型部分,模板则用来表示视图部分。 + 在Angular中,组件扮演着控制器或视图模型部分,模板则扮演视图部分。 Let’s find out what it takes to write a template for our view. We’ll cover these basic elements of template syntax: 我们来看看写视图的模板都需要什么。我们将覆盖模板语法中的下列基本元素: + * [HTML](#html) * [HTML](#html) * [Interpolation](#interpolation) * [插值表达式](#interpolation) @@ -45,7 +46,7 @@ include ../_util-fns * [NgFor](#ngFor) * [NgFor](#ngFor) * [* and <template>](#star-template) - * [* 和 <模板>](#star-template) + * [* 与 <template>](#star-template) * [Template reference variables](#ref-vars) * [模板引用变量](#ref-vars) * [Input and output properties](#inputs-outputs) @@ -53,9 +54,9 @@ include ../_util-fns * [Template expression operators](#expression-operators) * [模板表达式操作符](#expression-operators) * [pipe](#pipe) - * [pipe](#pipe) + * [管道](#pipe) * ["safe navigation operator" (?.)](#safe-navigation-operator) - * ["安全导航操作符" (?.)](#safe-navigation-operator) + * [“安全导航操作符”(?.)](#safe-navigation-operator) // #enddocregion intro .l-sub-section :marked @@ -66,6 +67,7 @@ include ../_util-fns // #docregion html-1 .l-main-section :marked + ## HTML ## HTML HTML is the language of the Angular template. Our [QuickStart](../quickstart.html) application had a template that was pure HTML: @@ -77,15 +79,15 @@ include ../_util-fns :marked Almost all HTML syntax is valid template syntax. The `