From c750f28598b20e6d4e6887ab3b4f315fcd5baacd Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Wed, 18 May 2016 18:00:21 +0800 Subject: [PATCH] =?UTF-8?q?feature=E7=9A=84=E7=BF=BB=E8=AF=91=E4=BB=8E?= =?UTF-8?q?=E7=89=B9=E5=BE=81=E6=94=B9=E4=B8=BA=E7=89=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/docs/ts/latest/glossary.jade | 4 ++-- public/docs/ts/latest/guide/architecture.jade | 2 +- public/docs/ts/latest/guide/attribute-directives.jade | 9 ++++++++- public/docs/ts/latest/guide/forms.jade | 2 +- .../docs/ts/latest/testing/application-under-test.jade | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/public/docs/ts/latest/glossary.jade b/public/docs/ts/latest/glossary.jade index 28838b2d28..f3522499ab 100644 --- a/public/docs/ts/latest/glossary.jade +++ b/public/docs/ts/latest/glossary.jade @@ -286,7 +286,7 @@ include _util-fns Decorators are a JavaScript language [feature](https://github.com/wycats/javascript-decorators), implemented in TypeScript and proposed for ES2016 (AKA ES7). - 装饰器是一个JavaScript的语言[特征](https://github.com/wycats/javascript-decorators),装饰器在TypeScript里面已经采纳并实现了,并被推荐到了ES2016(也就是ES7)。 + 装饰器是一个JavaScript的语言[特性](https://github.com/wycats/javascript-decorators),装饰器在TypeScript里面已经采纳并实现了,并被推荐到了ES2016(也就是ES7)。 We apply a decorator by positioning it immediately above or to the left of the thing it decorates. @@ -812,7 +812,7 @@ include _util-fns and managing the entire view navigation process including the creation and destruction of views. - Angular的[组件路由器Component Router](guide/router.html)是一个设置和管理整个视图导航过程的特征非常丰富的机制,包括建立和销毁视图。 + Angular的[组件路由器Component Router](guide/router.html)是一个设置和管理整个视图导航过程的特性非常丰富的机制,包括建立和销毁视图。 :marked ## Routing Component diff --git a/public/docs/ts/latest/guide/architecture.jade b/public/docs/ts/latest/guide/architecture.jade index 452186a14d..22faac9a19 100644 --- a/public/docs/ts/latest/guide/architecture.jade +++ b/public/docs/ts/latest/guide/architecture.jade @@ -713,7 +713,7 @@ figure There is nothing specifically *Angular* about services. Angular itself has no definition of a *service*. There is no *ServiceBase* class. - 服务没有什么特别属于Angular的特征。Angular本身对于服务也没有什么定义。 + 服务没有什么特别属于Angular的特性。Angular本身对于服务也没有什么定义。 它甚至都没有*ServiceBase*类。 Yet services are fundamental to any Angular application. diff --git a/public/docs/ts/latest/guide/attribute-directives.jade b/public/docs/ts/latest/guide/attribute-directives.jade index fbe5bb9e2f..9fc0ab6892 100644 --- a/public/docs/ts/latest/guide/attribute-directives.jade +++ b/public/docs/ts/latest/guide/attribute-directives.jade @@ -148,19 +148,26 @@ include ../_quickstart_repo There is also less risk of colliding with a third-party directive name when we give ours a prefix. 不过,我们还是建议选择一个带前缀的选择器名称,以保证无论现在还是未来它都不会和任何标准HTML Attribute发生冲突。 - + 当我们使用自己的前缀时,也会减少和第三方指令发生命名冲突的风险。 We do **not** prefix our `highlight` directive name with **`ng`**. That prefix belongs to Angular and we don't want to confuse our directives with their directives. + + 我们**不能**给自己的`highlight`指令添加**`ng`**前缀。 + 那个前缀属于Angular,我们肯定不会希望自己的指令和内建指令相混淆。 We need a prefix of our own, preferably short, and `my` will do for now. + 我们需要一个自己的前缀,最好短点儿,所以用`my`就不错。 + :marked After the `@Directive` metadata comes the directive's controller class which we are exporting to make it accessible to other components. The directive's controller class contains the logic for the directive. + 在`@Directive`元数据的后面,是指令的控制器类,我们导出它,以便让它能被其它组件访问。类里的代码就是指令的逻辑。 + Angular creates a new instance of the directive's controller class for each matching element, injecting an Angular `ElementRef` into the constructor. diff --git a/public/docs/ts/latest/guide/forms.jade b/public/docs/ts/latest/guide/forms.jade index 67c12ad27b..382481df61 100644 --- a/public/docs/ts/latest/guide/forms.jade +++ b/public/docs/ts/latest/guide/forms.jade @@ -1172,7 +1172,7 @@ figure.image-display The Angular 2 form discussed in this chapter takes advantage of the following framework features to provide support for data modification, validation and more: - 本章讨论的Angular 2表单利用了下列框架特征来支持数据修改、验证和更多操作: + 本章讨论的Angular 2表单利用了下列框架特性来支持数据修改、验证和更多操作: - An Angular HTML form template. diff --git a/public/docs/ts/latest/testing/application-under-test.jade b/public/docs/ts/latest/testing/application-under-test.jade index 3348a873a1..6edc812e9a 100644 --- a/public/docs/ts/latest/testing/application-under-test.jade +++ b/public/docs/ts/latest/testing/application-under-test.jade @@ -3,7 +3,7 @@ include ../_util-fns :marked We’ll need an Angular application to test, one as simple as possible while having most of the angular features we want to test. - 我们将需要一个Angular应用程序来测试,一个尽量简单,但几乎拥有所有我们想要测试angular特征的应用程序。 + 我们将需要一个Angular应用程序来测试,一个尽量简单,但几乎拥有所有我们想要测试angular特性的应用程序。 What better app than our own [The Tour of Heroes](../tutorial/toh-pt5.html)? We're already quite familiar with it and it fits our criteria, so let's try to test what we've done there. 什么应用程序比我们自己的[英雄指南](../tutorial/toh-pt5.html)更合适?我们已经很熟悉它了,它也适合我们的需求,所以让我们来测试一下我们已经完成了的功能。