修正pattern的翻译,开始js-to-ts翻译。
This commit is contained in:
parent
0d3cb23139
commit
74c5868747
|
@ -6,12 +6,17 @@ include ../../../../_includes/_util-fns
|
|||
matter of changing the way we organize our code and the way we access
|
||||
Angular 2 APIs.
|
||||
|
||||
所有能在TypeScript环境里面做的Angular 2事情,我们都能在JavaScript里面实现。
|
||||
从一个语言翻译到另一个语言最多只能改变我们对源代码的管理方法和如何访问Angular 2的API。
|
||||
|
||||
Since TypeScript is a popular language option in Angular 2, many of the
|
||||
code examples you see on the Internet as well as on this site are written
|
||||
in TypeScript. This cookbook contains recipes for translating these kinds of
|
||||
code examples to ES5, so that they can be applied to Angular 2 JavaScript
|
||||
applications.
|
||||
|
||||
|
||||
|
||||
<a id="toc"></a>
|
||||
:marked
|
||||
## Table of contents
|
||||
|
|
|
@ -4,7 +4,7 @@ include ../_util-fns
|
|||
Dependency Injection is a powerful pattern for managing code dependencies.
|
||||
In this cookbook we will explore many of the features of Dependency Injection (DI) in Angular.
|
||||
|
||||
依赖注入是一个强大的管理代码依赖链的架构样板。在这个“食谱”中,我们会讨论Angular依赖注入的许多特性。
|
||||
依赖注入是一个强大的管理代码依赖链的架构模式。在这个“食谱”中,我们会讨论Angular依赖注入的许多特性。
|
||||
|
||||
<a id="toc"></a>
|
||||
:marked
|
||||
|
|
|
@ -279,7 +279,7 @@ a(href="#toc") 回到顶部
|
|||
:marked
|
||||
**Do** follow a pattern that describes the symbol's feature then its type. The recommended pattern is `feature.type.ts`.
|
||||
|
||||
**坚持** 遵循一个样板来描述标志的特性和类型。推荐的样板为`feature.type.ts`。
|
||||
**坚持** 遵循一个模式来描述标志的特性和类型。推荐的模式为`feature.type.ts`。
|
||||
|
||||
.s-why
|
||||
:marked
|
||||
|
@ -329,7 +329,7 @@ a(href="#toc") 回到顶部
|
|||
:marked
|
||||
**Do** use consistent names for all components following a pattern that describes the component's feature then its type. A recommended pattern is `feature.type.ts`.
|
||||
|
||||
**坚持** 对所有组件使用一致的命名规则,遵循这个样板:先描述组件的特征,再描述它的类型。推荐的样板为`feature.type.ts`。
|
||||
**坚持** 对所有组件使用一致的命名规则,遵循这个模式:先描述组件的特征,再描述它的类型。推荐的模式为`feature.type.ts`。
|
||||
|
||||
.s-rule.do
|
||||
:marked
|
||||
|
@ -353,7 +353,7 @@ a(href="#toc") 回到顶部
|
|||
:marked
|
||||
**Why?** Provides pattern matching for any automated tasks.
|
||||
|
||||
**为何?** 与自动任务的样板匹配。
|
||||
**为何?** 与自动任务的模式匹配。
|
||||
|
||||
a(href="#toc") Back to top
|
||||
|
||||
|
@ -771,7 +771,7 @@ a(href="#toc") 回到顶部
|
|||
:marked
|
||||
**Why?** Provides pattern matching for [karma](http://karma-runner.github.io/) or other test runners.
|
||||
|
||||
**为何?** 提供一个与[karma](http://karma-runner.github.io/)或者其他测试运行器相配的命名样板。
|
||||
**为何?** 提供一个与[karma](http://karma-runner.github.io/)或者其他测试运行器相配的命名模式。
|
||||
|
||||
:marked
|
||||
- var top="vertical-align:top"
|
||||
|
@ -840,7 +840,7 @@ a(href="#toc") Back to top
|
|||
:marked
|
||||
**Why?** Provides pattern matching for test runners and build automation.
|
||||
|
||||
**为何?** 提供一个与测试运行器和构建自动化相配的样板。
|
||||
**为何?** 提供一个与测试运行器和构建自动化相配的模式。
|
||||
|
||||
:marked
|
||||
:marked
|
||||
|
@ -2643,7 +2643,7 @@ a(href="#toc") 回到顶部
|
|||
:marked
|
||||
**Why?** A component that handles routing is known as the component router, thus this follows the Angular 2 routing pattern.
|
||||
|
||||
*为何?** 处理路由的组件被称作组件路由器,它遵循Angular 2的路由样板。
|
||||
*为何?** 处理路由的组件被称作组件路由器,它遵循Angular 2的路由模式。
|
||||
|
||||
.s-why.s-why-last
|
||||
:marked
|
||||
|
@ -2707,7 +2707,7 @@ a(href="#toc") 回到顶部
|
|||
:marked
|
||||
**Do** use file templates or snippets to help follow consistent styles and patterns. Here are templates and/or snippets for some of the web development editors and IDEs.
|
||||
|
||||
**坚持** 使用文件模板或代码片段来帮助实现一致的风格和样板。下面是为一些网络开发编辑器和IDE准备的模板和/或代码片段:
|
||||
**坚持** 使用文件模板或代码片段来帮助实现一致的风格和模式。下面是为一些网络开发编辑器和IDE准备的模板和/或代码片段:
|
||||
|
||||
.s-rule.consider
|
||||
:marked
|
||||
|
|
Loading…
Reference in New Issue