diff --git a/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade b/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade index d192916901..53269c0627 100644 --- a/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade +++ b/public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade @@ -975,7 +975,7 @@ a(id="controllers-components") In both Angular 1 and Angular 2, we use Angular modules to help us organize our application into cohesive blocks of functionality. - 无论在Angular 1还是Angular 2中,我们都要借助“模块”来把应用拆分成一些内聚的功能块儿。 + 无论在Angular 1还是Angular 2中,我们都要借助“模块”来把应用拆分成一些紧密相关的功能块。 In Angular 1, we write the code that provides the model and the methods for the view in a **controller**. In Angular 2, we build a **component**. diff --git a/public/docs/ts/latest/cookbook/component-communication.jade b/public/docs/ts/latest/cookbook/component-communication.jade index 70d87784f9..d0525bb0a9 100644 --- a/public/docs/ts/latest/cookbook/component-communication.jade +++ b/public/docs/ts/latest/cookbook/component-communication.jade @@ -364,11 +364,11 @@ a(id="countdown-tests") Then Angular calls the `ngAfterViewInit` lifecycle hook at which time it is *too late* to update the parent view's display of the countdown seconds. Angular's unidirectional data flow rule prevents us from updating the parent view's in the same cycle. We have to *wait one turn* before we can display the seconds. - 然后Angular会调用`ngAfterViewInit`生命周期钩子,但这时候再更新父组件视图的倒计时就已经太晚了。Angular的单向数据流规则会阻止在同一个周期内更新父组件视图。我们在显示秒数之前会被迫*再等一轮儿*。 + 然后Angular会调用`ngAfterViewInit`生命周期钩子,但这时候再更新父组件视图的倒计时就已经太晚了。Angular的单向数据流规则会阻止在同一个周期内更新父组件视图。我们在显示秒数之前会被迫*再等一轮*。 We use `setTimeout` to wait one tick and then revise the `seconds` method so that it takes future values from the timer component. - 使用`setTimeout`来等下一轮儿,然后改写`seconds`方法,这样它接下来就会从注入的这个计时器组件里获取秒数的值。 + 使用`setTimeout`来等下一轮,然后改写`seconds`方法,这样它接下来就会从注入的这个计时器组件里获取秒数的值。 ### Test it ### 测试 diff --git a/public/docs/ts/latest/cookbook/dependency-injection.jade b/public/docs/ts/latest/cookbook/dependency-injection.jade index 26c6009d00..78ca03692f 100644 --- a/public/docs/ts/latest/cookbook/dependency-injection.jade +++ b/public/docs/ts/latest/cookbook/dependency-injection.jade @@ -635,7 +635,7 @@ figure.image-display If it doesn't, it may be able to make one with the help of a ***provider***. A *provider* is a recipe for delivering a service associated with a *token*. - 注入器从哪儿得到的依赖? + 注入器从哪得到的依赖? 它可能在自己内部容器里已经有该依赖了。 如果它没有,也能在***提供商***的帮助下新建一个。 *提供商*就是一个用于交付服务的配方,它被关联到一个令牌。 diff --git a/public/docs/ts/latest/glossary.jade b/public/docs/ts/latest/glossary.jade index 8a0a054f6f..47a8d23de7 100644 --- a/public/docs/ts/latest/glossary.jade +++ b/public/docs/ts/latest/glossary.jade @@ -207,7 +207,7 @@ block includes The practice of writing compound words or phrases such that each word or abbreviation begins with a capital letter _except the first letter which is a lowercase letter_. - 驼峰式命名法是指除了首字母要小写外,每个单词或缩写都以大写字母开头儿的形式来书写复合词或短语的一种实践。 + 驼峰式命名法是指除了首字母要小写外,每个单词或缩写都以大写字母开头的形式来书写复合词或短语的一种实践。 Function, property, and method names are typically spelled in camelCase. Examples include: `square`, `firstName` and `getHeroes`. @@ -233,7 +233,7 @@ block includes The Component is one of the most important building blocks in the Angular system. It is, in fact, an Angular [Directive](#directive) with a companion [Template](#template). - 组件是Angular系统中最重要的基本构造块儿之一。 + 组件是Angular系统中最重要的基本构造块之一。 它其实是一个拥有[模板(Template)](#template)的[指令(Directive)](#directive)。 The developer applies the `#{_at}Component` !{_decoratorLink} to @@ -976,7 +976,7 @@ a#Q is that the package name begins with the Angular *scope name*, `@angular`. 使用和导入*普通*包相同的方式导入范围化包。 - 从消费者的视角看,唯一的不同是那些包的名字是用Angular的*范围名*`@angular`开头儿的。 + 从消费者的视角看,唯一的不同是那些包的名字是用Angular的*范围名*`@angular`开头的。 +makeExcerpt('architecture/ts/app/app.component.ts', 'import', '') @@ -1050,7 +1050,7 @@ a#snake-case the support and continuing guidance of an Angular [Directive](#directive), most notably a [Component](#component). - 模板是一大块儿HTML。Angular会在[指令(Directive)](#directive)特别是[组件(Component)](#component)的支持和持续指导下,用它来渲染[视图(View)](#view)。 + 模板是一大块HTML。Angular会在[指令(Directive)](#directive)特别是[组件(Component)](#component)的支持和持续指导下,用它来渲染[视图(View)](#view)。 We write templates in a special [Template Syntax](/docs/ts/latest/guide/template-syntax.html). @@ -1164,7 +1164,7 @@ a#U A view is a portion of the screen that displays information and responds to user actions such as clicks, mouse moves, and keystrokes. - 视图是屏幕中一小块儿,用来显示信息并回应用户动作,比如点击、移动鼠标和按键等。 + 视图是屏幕中一小块,用来显示信息并回应用户动作,比如点击、移动鼠标和按键等。 Angular renders a view under the control of one or more [Directives](#directive), especially [Component](#component) directives and their companion [Templates](#template). diff --git a/public/docs/ts/latest/guide/architecture.jade b/public/docs/ts/latest/guide/architecture.jade index 15f922cc22..4ba4d87b0f 100644 --- a/public/docs/ts/latest/guide/architecture.jade +++ b/public/docs/ts/latest/guide/architecture.jade @@ -356,7 +356,7 @@ figure A template looks like regular HTML, except for a few differences. Here is a template for our `HeroListComponent`: - 多数情况下,模板看起来很像标准HTML……当然也有一小点儿奇怪的地方。下面是`HeroListComponent`组件的一个模板。 + 多数情况下,模板看起来很像标准HTML……当然也有一点奇怪的地方。下面是`HeroListComponent`组件的一个模板。 +makeExample('app/hero-list.component.html') diff --git a/public/docs/ts/latest/guide/attribute-directives.jade b/public/docs/ts/latest/guide/attribute-directives.jade index 755729b0e6..0e206c0a12 100644 --- a/public/docs/ts/latest/guide/attribute-directives.jade +++ b/public/docs/ts/latest/guide/attribute-directives.jade @@ -164,7 +164,7 @@ block highlight-directive-1 We need a prefix of our own, preferably short, and `my` will do for now. - 我们需要一个自己的前缀,最好短点儿,目前用的这个`my`前缀就不错。 + 我们需要一个自己的前缀,最好短点,目前用的这个`my`前缀就不错。 p | After the #[code @Directive] metadata comes the directive's controller class, which contains the logic for the directive. +ifDocsFor('ts') @@ -193,7 +193,7 @@ a#apply-directive applies the directive as an attribute to a paragraph (`p`) element. In Angular terms, the `
` element will be the attribute **host**. - 这个例子中,`AppComponent`是用来测试`HighlightDirective`的一个壳儿。 + 这个例子中,`AppComponent`是用来测试`HighlightDirective`的一个壳。 我们来给它一个新的模板,把这个指令作为属性应用到一个段落(`p`)元素上。 用Angular的话说,`
`元素就是这个属性型指令的**宿主**。 p @@ -458,7 +458,7 @@ a#input And yet this code works. Where is the template `color` value going? **但我们从来没有在宿主`AppComponent`上定义过color属性**! - 不过这段代码却能正常工作。模板中的`color`值哪儿去了? + 不过这段代码却能正常工作。模板中的`color`值哪去了? Browser debugging reveals that Angular dynamically added a `color` property to the runtime instance of the `AppComponent`. diff --git a/public/docs/ts/latest/guide/component-styles.jade b/public/docs/ts/latest/guide/component-styles.jade index 935d293e69..dd3746f4d0 100644 --- a/public/docs/ts/latest/guide/component-styles.jade +++ b/public/docs/ts/latest/guide/component-styles.jade @@ -262,7 +262,7 @@ block style-url component file. URL是***相对于应用程序根目录的***,它通常是应用的宿主页面`index.html`所在的地方。 - 这个样式文件的URL*不是*相对于组件文件的。这就是为什么范例中的URL用`app/`开头儿。 + 这个样式文件的URL*不是*相对于组件文件的。这就是为什么范例中的URL用`app/`开头。 参见[附录2](#relative-urls)来了解如何指定相对于组件文件的URL。 block module-bundlers @@ -444,7 +444,7 @@ code-example(format=""). We'll likely live with *emulated* mode until shadow DOM gains traction. - 小伙伴儿们会很愉快的使用*仿真*模式 —— 直到有一天Shadow DOM获得全面支持。 + 小伙伴们会很愉快的使用*仿真*模式 —— 直到有一天Shadow DOM获得全面支持。 a#relative-urls .l-main-section diff --git a/public/docs/ts/latest/guide/dependency-injection.jade b/public/docs/ts/latest/guide/dependency-injection.jade index 2110093ae5..87312ef758 100644 --- a/public/docs/ts/latest/guide/dependency-injection.jade +++ b/public/docs/ts/latest/guide/dependency-injection.jade @@ -1077,7 +1077,7 @@ block dart-diff-const-metadata-ctor 注意,我们在#{anexportedvarCn}中捕获了这个工厂提供商:`heroServiceProvider`。 这个额外的步骤让工厂提供商可被复用。 - 只要需要,我们就可以使用这个#{variableCn}注册`HeroService`,无论在哪儿。 + 只要需要,我们就可以使用这个#{variableCn}注册`HeroService`,无论在哪。 In our sample, we need it only in the `HeroesComponent`, where it replaces the previous `HeroService` registration in the metadata `providers` #{_array}. diff --git a/public/docs/ts/latest/guide/displaying-data.jade b/public/docs/ts/latest/guide/displaying-data.jade index e33949a3d0..12c36244a4 100644 --- a/public/docs/ts/latest/guide/displaying-data.jade +++ b/public/docs/ts/latest/guide/displaying-data.jade @@ -231,7 +231,7 @@ figure.image-display That's the Angular "repeater" directive. Its presence on the `