From cb95a74253572359b3194e3663f5085924fe7bae Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Fri, 27 May 2016 12:40:10 +0800 Subject: [PATCH] =?UTF-8?q?Rex=E7=9A=84=E7=89=88=E6=9C=AC=E5=87=BA?= =?UTF-8?q?=E7=8E=B0jade=E7=BC=96=E8=AF=91=E9=94=99=E8=AF=AF=EF=BC=8C?= =?UTF-8?q?=E6=81=A2=E5=A4=8D=E5=88=B0Wang=E7=9A=84=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../docs/ts/latest/guide/template-syntax.jade | 917 ++++++++---------- 1 file changed, 405 insertions(+), 512 deletions(-) diff --git a/public/docs/ts/latest/guide/template-syntax.jade b/public/docs/ts/latest/guide/template-syntax.jade index 63760deaef..b64ba46932 100644 --- a/public/docs/ts/latest/guide/template-syntax.jade +++ b/public/docs/ts/latest/guide/template-syntax.jade @@ -9,16 +9,15 @@ block includes :marked Our Angular application manages what the user sees and can do, achieving this through the interaction of a Component class instance (the *component*) and its user-facing template. - 我们的Angular应用管理着用户之所见和之所能,并通过组件类的实例以及组件面向用户的模板来与用户交互。 - + 我们的Angular应用管理着用户之所见和所为,并通过组件类的实例以及组件面向用户的模板来与用户交互。 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中,组件扮演着控制器或视图模型部分,模板则扮演视图部分。 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) @@ -61,42 +60,41 @@ block includes * [模板表达式操作符](#expression-operators) * [pipe](#pipe) * [管道](#pipe) - * ["safe navigation operator" (?.)](#safe-navigation-operator) + * [safe navigation operator (?.)](#safe-navigation-operator) * [“安全导航操作符”(?.)](#safe-navigation-operator) + p. The #[+liveExampleLink2()] demonstrates all of the syntax and code snippets described in this chapter. +p. + 这个#[+liveExampleLink2('在线例子')]演示了本章中描述的所有语法和代码片段。 - The #[+liveExampleLink2()] - 演示了本章中描述的所有语法和代码片段。 -// #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: - + HTML是Angular模板的“语言”。我们的[“快速起步”](../quickstart.html)应用就有一个模板是纯HTML的: - code-example(language="html" escape="html").

My First Angular 2 App

:marked Almost all HTML syntax is valid template syntax. The `