From 41b0cc800b6697345fbe70de12d61669e060452d Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Thu, 6 Oct 2016 20:37:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=AD=A3=E4=BA=86technically=E7=9A=84?= =?UTF-8?q?=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/docs/ts/latest/cookbook/dependency-injection.jade | 4 ++-- public/docs/ts/latest/guide/architecture.jade | 2 +- public/docs/ts/latest/guide/attribute-directives.jade | 2 +- public/docs/ts/latest/guide/dependency-injection.jade | 2 +- .../ts/latest/guide/hierarchical-dependency-injection.jade | 2 +- public/docs/ts/latest/guide/ngmodule.jade | 2 +- public/docs/ts/latest/guide/pipes.jade | 2 +- public/docs/ts/latest/guide/router.jade | 2 +- public/docs/ts/latest/guide/template-syntax.jade | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/public/docs/ts/latest/cookbook/dependency-injection.jade b/public/docs/ts/latest/cookbook/dependency-injection.jade index 36f2b32cf8..924fd09633 100644 --- a/public/docs/ts/latest/cookbook/dependency-injection.jade +++ b/public/docs/ts/latest/cookbook/dependency-injection.jade @@ -260,7 +260,7 @@ figure.image-display The `LoggerService` doesn't depend on anything. The logger would work if we omitted `@Injectable()` and the generated code would be slightly smaller. - 从技术上讲,这个`@Injectable()`装饰器只在一个服务类有_自己的依赖_的时候,才是_不可缺少_的。 + 严格来说,这个`@Injectable()`装饰器只在一个服务类有_自己的依赖_的时候,才是_不可缺少_的。 `LoggerService`不依赖任何东西,所以该日志服务在没有`@Injectable()`的时候应该也能工作,生成的代码也更少一些。 But the service would break the moment we gave it a dependency and we'd have to go back and @@ -1394,7 +1394,7 @@ a(id="parent-token") Although the `AlexComponent` has a `name` property (as required by its `Base` class) its class signature doesn't mention `Parent`: - 这样做可以提升代码的清晰度。但在技术上,这并不是必须的。虽然`AlexComponent`有一个`name`属性(来自`Base`类的要求),但它的类签名并不需要提及`Parent`。 + 这样做可以提升代码的清晰度,但严格来说并不是必须的。虽然`AlexComponent`有一个`name`属性(来自`Base`类的要求),但它的类签名并不需要提及`Parent`。 +makeExample('cb-dependency-injection/ts/app/parent-finder.component.ts','alex-class-signature','parent-finder.component.ts (AlexComponent class signature)')(format='.') .l-sub-section diff --git a/public/docs/ts/latest/guide/architecture.jade b/public/docs/ts/latest/guide/architecture.jade index 223bbb2200..3b66430c88 100644 --- a/public/docs/ts/latest/guide/architecture.jade +++ b/public/docs/ts/latest/guide/architecture.jade @@ -615,7 +615,7 @@ figure While **a component is technically a directive**, components are so distinctive and central to Angular applications that this architectural overview separates components from directives. - 虽然**组件从技术角度看就是一个指令**,但是组件非常独特,并在Angular中位于中心地位,所以在架构概览中,我们把组件从指令中独立了出来。 + 虽然**严格来说组件就是一个指令**,但是组件非常独特,并在Angular中位于中心地位,所以在架构概览中,我们把组件从指令中独立了出来。 :marked Two *other* kinds of directives exist: _structural_ and _attribute_ directives. diff --git a/public/docs/ts/latest/guide/attribute-directives.jade b/public/docs/ts/latest/guide/attribute-directives.jade index bdac66337d..efca11a311 100644 --- a/public/docs/ts/latest/guide/attribute-directives.jade +++ b/public/docs/ts/latest/guide/attribute-directives.jade @@ -147,7 +147,7 @@ block highlight-directive-1 ### 为什么不直接叫做"highlight"? *highlight* is a nicer name than *myHighlight* and, technically, it would work if we called it that. - 从技术上说,*highlight*是一个比*myHighlight*更好的名字,而且在这里它确实能工作。 + 理论上,*highlight*是一个比*myHighlight*更好的名字,而且在这里它确实能工作。 However, we recommend picking a selector name with a prefix to ensure that it cannot conflict with any standard HTML attribute, now or in the future. diff --git a/public/docs/ts/latest/guide/dependency-injection.jade b/public/docs/ts/latest/guide/dependency-injection.jade index 82d1c6da0e..623324fd7c 100644 --- a/public/docs/ts/latest/guide/dependency-injection.jade +++ b/public/docs/ts/latest/guide/dependency-injection.jade @@ -641,7 +641,7 @@ block injectable-not-always-needed-in-ts We recommend adding `@Injectable()` to every service class, even those that don't have dependencies and, therefore, do not technically require it. Here's why: - 我们建议为每个服务类都添加`@Injectable()`,包括那些没有依赖所以技术上不需要它的。因为: + 我们建议为每个服务类都添加`@Injectable()`,包括那些没有依赖因此严格来说并不需要它的。因为: ul(style="font-size:inherit") li Future proofing: No need to remember @Injectable() when we add a dependency later. diff --git a/public/docs/ts/latest/guide/hierarchical-dependency-injection.jade b/public/docs/ts/latest/guide/hierarchical-dependency-injection.jade index 398388ab15..bf8df7ae19 100644 --- a/public/docs/ts/latest/guide/hierarchical-dependency-injection.jade +++ b/public/docs/ts/latest/guide/hierarchical-dependency-injection.jade @@ -252,7 +252,7 @@ figure.image-display :marked Technically we could, but our component wouldn’t quite behave the way it is supposed to. Remember that each injector treats the services that it provides as singletons. However, in order to be able to have multiple instances of `HeroEditComponent` edit multiple heroes at the same time we need to have multiple instances of the `RestoreService`. More specifically, each instance of `HeroEditComponent` needs to be bound to its own instance of the `RestoreService`. - 从技术上讲,可以。但我们的组件将不会像预期的那样工作。记住,每个注入器都会把它提供的服务处理成单例。 + 虽然理论上可以,但我们的组件却无法像预期的那样工作。记住,每个注入器都会把它提供的服务处理成单例。 可是,我们需要同时用多个`HeroEditComponent`实例来编辑多个英雄,这就意味着我们需要`RestoreService`的多个实例。 更明确的说,每个`HeroEditComponent`的实例都得绑定到它自己的`RestoreService`实例。 diff --git a/public/docs/ts/latest/guide/ngmodule.jade b/public/docs/ts/latest/guide/ngmodule.jade index 57b4b5639b..f303d66d41 100644 --- a/public/docs/ts/latest/guide/ngmodule.jade +++ b/public/docs/ts/latest/guide/ngmodule.jade @@ -1489,7 +1489,7 @@ a#shared-module As it happens, the components declared by `SharedModule` itself don't bind with `[(ngModel)]`. Technically, there is no need for `SharedModule` to import `FormsModule`. - 实际上,`SharedModule`本身所声明的组件没绑定过`[(ngModel)]`,那么,从技术角度看`SharedModule`并不需要导入`FormsModule`。 + 实际上,`SharedModule`本身所声明的组件没绑定过`[(ngModel)]`,那么,严格来说`SharedModule`并不需要导入`FormsModule`。 `SharedModule` can still export `FormsModule` without listing it among its `imports`. diff --git a/public/docs/ts/latest/guide/pipes.jade b/public/docs/ts/latest/guide/pipes.jade index bf5c7c1c84..b6aec885dd 100644 --- a/public/docs/ts/latest/guide/pipes.jade +++ b/public/docs/ts/latest/guide/pipes.jade @@ -235,7 +235,7 @@ figure.image-display `transform`方法是管道的基本要素。 `PipeTransform`*接口*中定义了它,并用它指导各种工具和编译器。 - 从技术角度看,它是可选的。Angular不会管它,而是直接查找并执行`transform`方法。 + 严格来说,它是可选的。Angular不会管它,而是直接查找并执行`transform`方法。 :marked Now we need a component to demonstrate our pipe. diff --git a/public/docs/ts/latest/guide/router.jade b/public/docs/ts/latest/guide/router.jade index d2c97b5758..e3a27a3a22 100644 --- a/public/docs/ts/latest/guide/router.jade +++ b/public/docs/ts/latest/guide/router.jade @@ -2551,7 +2551,7 @@ code-example. In our example, the redirect is at the top level of the route configuration tree so the *remaining* URL and the *entire* URL are the same thing. - 从技术的角度看,`pathMatch = 'full'`导致路由器尝试用URL中*剩下的*、未匹配过的片段去匹配`''`。 + 从原理上说,`pathMatch = 'full'`导致路由器尝试用URL中*剩下的*、未匹配过的片段去匹配`''`。 在这个例子中,重定向发生在路由配置树的顶级,所以*剩下的*URL和*完整的*URL是完全一样的。 The other possible `pathMatch` value is `'prefix'` which tells the router diff --git a/public/docs/ts/latest/guide/template-syntax.jade b/public/docs/ts/latest/guide/template-syntax.jade index 320538ba11..d096c30674 100644 --- a/public/docs/ts/latest/guide/template-syntax.jade +++ b/public/docs/ts/latest/guide/template-syntax.jade @@ -875,7 +875,7 @@ table one of the property names listed in the directive’s `inputs` array or a property decorated with `@Input()`. Such inputs map to the directive’s own properties. - 从技术的角度看,Angular正在匹配一个指令的[input](#inputs-outputs)的名字。这个名字是指令的`inputs`数组中所列的名字之一,或者是一个带有`@Input()`装饰器的属性。 + 严格来说,Angular正在匹配一个指令的[input](#inputs-outputs)的名字。这个名字是指令的`inputs`数组中所列的名字之一,或者是一个带有`@Input()`装饰器的属性。 这样的inputs被映射到了指令自己的属性。 :marked If the name fails to match a property of a known directive or element, Angular reports an “unknown directive” error.