diff --git a/public/_includes/_main-nav.jade b/public/_includes/_main-nav.jade index fdaa934f89..edd3d6457a 100644 --- a/public/_includes/_main-nav.jade +++ b/public/_includes/_main-nav.jade @@ -17,5 +17,4 @@ md-toolbar(class="main-nav background-regal l-pinned-top l-layer-5",scroll-y-off li.l-right 立即开始! li.l-right a.main-nav-button.md-button(ng-click="appCtrl.toggleSource($event)", href) - span(ng-if="!appCtrl.sourceVisible") 显示原文 - span(ng-if="appCtrl.sourceVisible") 隐藏原文 + span {{appCtrl.sourceVisible?'隐藏原文':'显示原文'}} diff --git a/public/docs/ts/latest/guide/dependency-injection.jade b/public/docs/ts/latest/guide/dependency-injection.jade index 24b10c438b..ba4f66b03e 100644 --- a/public/docs/ts/latest/guide/dependency-injection.jade +++ b/public/docs/ts/latest/guide/dependency-injection.jade @@ -23,7 +23,7 @@ block includes - [Angular dependency injection](#angular-dependency-injection) - [Angular依赖注入](#angular-dependency-injection) - [Injector providers](#injector-providers) - - [注入器提供商](#injector-providers) + - [注入器供应商](#injector-providers) - [Dependency injection tokens](#dependency-injection-tokens) - [依赖注入令牌](#dependency-injection-tokens) - [Summary](#summary) diff --git a/public/docs/ts/latest/tutorial/toh-pt4.jade b/public/docs/ts/latest/tutorial/toh-pt4.jade index abb5849339..c356ad2b65 100644 --- a/public/docs/ts/latest/tutorial/toh-pt4.jade +++ b/public/docs/ts/latest/tutorial/toh-pt4.jade @@ -139,7 +139,7 @@ code-example(language="bash"). 当TypeScript看到`@Injectable()`装饰器时,就会记下本服务的元数据。如果Angular需要往这个服务中注入其它依赖,就会使用这些元数据。 The `HeroService` doesn't have any dependencies *at the moment*. Add the decorator anyway. - It is a "best practice" to apply the `@Injectable()` decorator ​*from the start*​ + It is a "best practice" to apply the `@Injectable()` decorator *from the start* both for consistency and for future-proofing. 此刻,`HeroService`还没有任何依赖,但我们还是得加上这个装饰器。作为一项最佳实践,无论是出于提高统一性还是减少变更的目的,都应该从一开始就加上`@Injectable()`装饰器。 @@ -260,7 +260,7 @@ code-example(language="bash"). 我们很难在别的场景中把它换成别的实现。 比如,能离线操作吗?能在测试时使用不同的模拟版本吗?这可不容易。 - *What if ... what if ... Hey, we've got work to do!* + * What if ... what if ... Hey, we've got work to do!* * 如果……如果……嘿!这下我们可有得忙了! We get it. Really we do. @@ -320,6 +320,9 @@ code-example(format="." language="html"). :marked The `providers` array tells Angular to create a fresh instance of the `HeroService` when it creates a new `AppComponent`. The `AppComponent` can use that service to get heroes and so can every child component of its component tree. + + `providers`数组告诉Angular,当它创建新的`AppComponent`组件时,也要创建一个`HeroService`的新实例。 + `AppComponent`会使用那个服务来获取影响列表,在它组件树中的每一个子组件也同样如此。 a#child-component :marked ### *getHeroes* in the *AppComponent* diff --git a/public/translate/cn/about.jade b/public/translate/cn/about.jade index d6e055a0f1..36f8be0739 100644 --- a/public/translate/cn/about.jade +++ b/public/translate/cn/about.jade @@ -49,5 +49,7 @@ 在翻译和校对过程中,我们得到了很多人的帮助,在此一并致谢,他/她们是: - Joeylin + - 张旋 + - 还有一些做好事不留名的雷锋 想让你的名字也出现在这里吗?请提供[反馈、纠错](https://github.com/angular/angular-cn/issues)。