调整additional的翻译
This commit is contained in:
parent
020722e3ea
commit
78418f4d3c
@ -1335,7 +1335,7 @@ a(id="parent-tree")
|
||||
:marked
|
||||
It's identical to *Carol*'s constructor except for the additional `@SkipSelf` decorator.
|
||||
|
||||
除添加了一个额外的`@SkipSelf`外,它和*Carol*的构造函数一样。
|
||||
除额外添加了一个的`@SkipSelf`外,它和*Carol*的构造函数一样。
|
||||
|
||||
`@SkipSelf` is essential for two reasons:
|
||||
|
||||
|
@ -134,7 +134,7 @@ table
|
||||
## 可选浏览器特性的填充库 ##
|
||||
Some features of Angular may require additional polyfills.
|
||||
|
||||
有些Angular特性可能需要额外的填充库。
|
||||
有些Angular特性可能需要更多填充库。
|
||||
|
||||
For example, the animations library relies on the standard web animation API, which is only available in Chrome and Firefox today.
|
||||
You'll need a polyfill to use animations in other browsers.
|
||||
@ -143,7 +143,7 @@ table
|
||||
|
||||
Here are the features which may require additional polyfills:
|
||||
|
||||
下列特性可能需要额外的填充库:
|
||||
下列特性可能需要更多填充库:
|
||||
|
||||
table
|
||||
tr(style="vertical-align: top")
|
||||
|
@ -170,7 +170,7 @@ figure.image-display
|
||||
is simpler without the additional HTML file.
|
||||
|
||||
到底选择内联HTML还是独立HTML取决于:个人喜好、具体状况和组织级策略。
|
||||
这里我们选择内联HTML,是因为模板很小,而且这个演示很简单,没有额外的HTML文件。
|
||||
这里我们选择内联HTML,是因为模板很小,而且这个演示很简单,没有别的HTML文件。
|
||||
|
||||
In either style, the template data bindings have the same access to the component's properties.
|
||||
|
||||
|
@ -1093,7 +1093,7 @@ figure.image-display
|
||||
It also has its own `valid` property which is true only *if every contained
|
||||
control* is valid.
|
||||
|
||||
`NgForm`指令为普通的`form`元素扩充了额外的特性。
|
||||
`NgForm`指令为普通的`form`元素扩充了更多特性。
|
||||
它持有我们通过`ngModel`指令和`name`属性为各个元素创建的那些控件类,并且监视它们的属性变化,包括有效性。
|
||||
它还有自己的`valid`属性,只有当*每一个被包含的控件*都有效时,它才有效。
|
||||
|
||||
|
@ -41,7 +41,7 @@ block includes
|
||||
* [Declarations](#declarations "Declare the components, directives, and pipes that belong to a module")
|
||||
* [声明](#declarations "声明从属于模块的组件、指令和管道")
|
||||
* [Providers](#providers "Extend the app with additional services")
|
||||
* [提供商](#providers "使用额外的服务来扩展该应用")
|
||||
* [提供商](#providers "使用更多服务来扩展该应用")
|
||||
* [Imports](#imports "Import components, directives, and pipes for use in component templates")
|
||||
* [导入](#imports "为组件模板导入组件、指令和管道")
|
||||
* [Resolve conflicts](#resolve-conflicts "When two directives have the same selector ...")
|
||||
|
@ -45,7 +45,7 @@ include ../_util-fns
|
||||
:marked
|
||||
Note: A cookbook or guide page may require an additional library such as *jQuery*.
|
||||
|
||||
注意:烹饪宝典或开发指南中的页面可能需要额外的库,比如*jQuery*。
|
||||
注意:烹饪宝典或开发指南中的页面可能需要其它库,比如*jQuery*。
|
||||
|
||||
:marked
|
||||
You'll install more than you need for QuickStart.
|
||||
@ -156,7 +156,7 @@ a(id="dependencies")
|
||||
Your future applications are likely to require additional packages that provide
|
||||
HTML controls, themes, data access, and various utilities.
|
||||
|
||||
今后,应用程序很可能还会需要一些额外的包,比如HTML控件、主题、数据访问,以及其它多种工具。
|
||||
今后,应用程序很可能还会需要更多的包,比如HTML控件、主题、数据访问,以及其它多种工具。
|
||||
|
||||
|
||||
a(id="polyfills")
|
||||
|
@ -210,7 +210,7 @@ figure.image-display
|
||||
* There will be one additional argument to the `transform` method for each parameter passed to the pipe.
|
||||
Our pipe has one such parameter: the `exponent`.
|
||||
|
||||
* 当每个输入值被传给`transform`方法时,还会带有一个额外的参数,比如我们这个管道中的`exponent`(放大指数)。
|
||||
* 当每个输入值被传给`transform`方法时,还会带上另一个参数,比如我们这个管道中的`exponent`(放大指数)。
|
||||
|
||||
* We tell Angular that this is a pipe by applying the
|
||||
`@Pipe` #{_decorator} which we import from the core Angular library.
|
||||
@ -389,7 +389,7 @@ a#change-detection
|
||||
|
||||
如果我们**修改了**这个数组,没有管道被执行,也没有显示被更新。
|
||||
如果我们**替换了**这个数组,管道就会被执行,显示也更新了。
|
||||
这个*飞行英雄*的例子用检查框和额外的显示内容扩展了原有代码,来帮我们体验这些效果。
|
||||
这个*飞行英雄*的例子用检查框和其它显示内容扩展了原有代码,来帮我们体验这些效果。
|
||||
|
||||
figure.image-display
|
||||
img(src='/resources/images/devguide/pipes/flying-heroes-anim.gif' alt="Flying Heroes")
|
||||
|
@ -270,7 +270,7 @@ include ../_util-fns
|
||||
to retrieve additional data later in the chapter.
|
||||
|
||||
第三个路由中的`data`属性用来存放于每个具体路由有关的任意信息。该数据可以被任何一个激活路由访问,并能用来保存诸如
|
||||
页标题、面包屑以及其它只读数据。本章稍后的部分,我们将使用[resolve守卫](#resolve-guard)来获取这些附加数据。
|
||||
页标题、面包屑以及其它只读数据。本章稍后的部分,我们将使用[resolve守卫](#resolve-guard)来获取更多数据。
|
||||
|
||||
The `empty path` in the fourth route matches as the default path for each level of routing. It
|
||||
also allows for adding routes without extending the URL path.
|
||||
@ -1337,7 +1337,7 @@ figure.image-display
|
||||
The **RouterModule.forRoot** should only be provided for the `AppModule`. Since we are in a feature
|
||||
module, we'll use **RouterModule.forChild** method to only register additional routes.
|
||||
|
||||
**RouterModule.forRoot**只能由`AppModule`提供。但我们位于特性模块中,所以使用**RouterModule.forChild**来单独注册附加路由。
|
||||
**RouterModule.forRoot**只能由`AppModule`提供。但我们位于特性模块中,所以使用**RouterModule.forChild**来单独注册更多路由。
|
||||
|
||||
:marked
|
||||
We import our `heroesRouting` token from `heroes.routing.ts` into our `Heroes` module and register the routing.
|
||||
@ -2888,7 +2888,7 @@ a#can-activate-guard
|
||||
`[routerLinkActiveOptions]="{ exact: true }"` which will only mark the `./` link as active when
|
||||
we navigate the to `/admin` URL and not when we navigate to one the other child routes.
|
||||
|
||||
由于`AdminModule`中管理仪表盘的`RouterLink`是一个空路径的路由,所以它会匹配到管理特性区的任何路由。但我们只有在访问`Dashboard`路由时才希望该链接被激活。所以我们往`Dashboard`这个routerLink上添加了一个额外的绑定`[routerLinkActiveOptions]="{ exact: true }"`,这样就只有当我们导航到`/admin`这个URL时才会激活它,而不会在导航到它的某个子路由时。
|
||||
由于`AdminModule`中管理仪表盘的`RouterLink`是一个空路径的路由,所以它会匹配到管理特性区的任何路由。但我们只有在访问`Dashboard`路由时才希望该链接被激活。所以我们往`Dashboard`这个routerLink上添加了另一个绑定`[routerLinkActiveOptions]="{ exact: true }"`,这样就只有当我们导航到`/admin`这个URL时才会激活它,而不会在导航到它的某个子路由时。
|
||||
|
||||
:marked
|
||||
Our initial admin routing configuration:
|
||||
@ -2909,7 +2909,7 @@ h3#component-less-route <i>无组件路由</i>: 不借助组件对路由进行
|
||||
We want to group our `Crisis Center` management routes under the `admin` path, but we don't need a component
|
||||
just to group those routes under an additional `RouterOutlet`. This also allows us to [guard child routes](#can-activate-child-guard).
|
||||
|
||||
虽然我们希望对`admin`路径下的`危机中心`管理类路由进行分组,但并不需要一个仅用来通过额外的`RouterOutlet`分组路由的组件。
|
||||
虽然我们希望对`admin`路径下的`危机中心`管理类路由进行分组,但并不需要另一个仅用来分组路由的组件。
|
||||
这同时也允许我们[守卫子路由](#can-activate-child-guard)。
|
||||
|
||||
:marked
|
||||
@ -3557,7 +3557,7 @@ a#fragment
|
||||
users will still visit `/admin` and our `AdminComponent` still serves as our *Routing Component* which contains
|
||||
our child routes.
|
||||
|
||||
接下来,在`admin.routing.ts`中,把`admin`的**path**更改为空路径。路由器支持**空路径**路由,它可以被用来在不添加额外路径到URL的情况下,将多个路由组合到一起。用户还是可以访问`/crisis-center`,`CrisisCenterComponent`组件还是包含了子级路由的**路由组件**。
|
||||
接下来,在`admin.routing.ts`中,把`admin`的**path**更改为空路径。路由器支持**空路径**路由,它可以在不必把别的路径添加到URL中的情况下,将多个路由组合到一起。用户还是可以访问`/crisis-center`,`CrisisCenterComponent`组件还是包含了子级路由的**路由组件**。
|
||||
|
||||
+makeTabs(
|
||||
`router/ts/app/app.routing.ts,
|
||||
|
@ -355,7 +355,7 @@ figure.image-display
|
||||
the `hero` template input variable (the current item in each iteration).
|
||||
|
||||
Angular的[ngFor微语法](template-syntax.html#ngForMicrosyntax)里面有一些细微差别,
|
||||
它被展开成了额外的`ngForOf`属性绑定(可迭代者)和一个模板输入变量`hero`(每次迭代中的当前条目)。
|
||||
它被展开成了另一个`ngForOf`属性绑定(可迭代者)和另一个模板输入变量`hero`(每次迭代中的当前条目)。
|
||||
|
||||
<a id="unless"></a>
|
||||
.l-main-section
|
||||
@ -504,7 +504,7 @@ figure.image-display
|
||||
additional checks to improve performance (don't clear or recreate the
|
||||
view unless necessary) but otherwise it's much the same.
|
||||
|
||||
`ngIf`也没多大不同嘛!它做了一些额外的检查来提升性能(除非必要,否则它不会清除或重新创建视图),但其它的部分都跟我们写的一样。
|
||||
`ngIf`也没多大不同嘛!它做了更多的检查来提升性能(除非必要,否则它不会清除或重新创建视图),但其它的部分都跟我们写的一样。
|
||||
|
||||
.l-main-section
|
||||
:marked
|
||||
|
@ -335,7 +335,7 @@ a(href="#toc") 回到顶部
|
||||
Invent additional type names if you must but take care not to create too many.
|
||||
|
||||
**坚持**使用惯用的后缀来描述类型,比如`*.service`、`*.component`、`*.pipe`、`.module`、`.directive`。
|
||||
创建额外的类型名字,但你必须注意不要创建太多。
|
||||
创建更多类型名,但你必须注意不要创建太多。
|
||||
|
||||
|
||||
.s-why
|
||||
|
@ -2144,7 +2144,7 @@ figure.image-display
|
||||
track the validity of user input.
|
||||
|
||||
如果Angular没有接管它,那它可能是个[HTMLFormElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement)。
|
||||
实际上它是个`ngForm`,一个对Angular内置指令`NgForm`的引用。它包装了原生的`HTMLFormElement`并赋予它额外的“超能力”,比如跟踪用户输入的有效性。
|
||||
实际上它是个`ngForm`,一个对Angular内置指令`NgForm`的引用。它包装了原生的`HTMLFormElement`并赋予它更多“超能力”,比如跟踪用户输入的有效性。
|
||||
|
||||
This explains how we can disable the submit button by checking `theForm.form.valid`
|
||||
and pass an object with rich information to the parent component's `onSubmit` method.
|
||||
|
@ -93,7 +93,7 @@ a(id="tsconfig")
|
||||
|
||||
如果我们把`noImplicitAny`标志设置为了`true`,我们可能会得到*隐式索引错*。
|
||||
大多数程序员可能觉得*这种错误*是个烦恼而不是助力。
|
||||
我们可以使用下列附加标志来禁止它们。
|
||||
我们可以使用另一个标志来禁止它们。
|
||||
|
||||
code-example(format=".").
|
||||
"suppressImplicitAnyIndexErrors":true
|
||||
|
@ -434,7 +434,7 @@ table
|
||||
There is a [tree hierarchy of injectors](../guide/hierarchical-dependency-injection.html),
|
||||
with a root injector and an additional injector for each component.
|
||||
|
||||
有一组[树状多层注入器](../guide/hierarchical-dependency-injection.html),有一个根注入器,每个组件也有一个额外的注入器。
|
||||
有一组[树状多层注入器](../guide/hierarchical-dependency-injection.html),有一个根注入器,每个组件也另外有一个注入器。
|
||||
|
||||
:marked
|
||||
Even accounting for these differences we can still have dependency injection
|
||||
@ -552,7 +552,7 @@ figure.image-display
|
||||
use Angular 1 component directives from Angular 2.
|
||||
|
||||
此时,`<ng2-component>`这个DOM元素仍然由Angular 1管理,因为它是在Angular 1的模板中定义的。
|
||||
这也意味着你可以往它上面添加额外的Angular 1指令,却*不能*添加Angular 2的指令。
|
||||
这也意味着你可以往它上面添加别的Angular 1指令,却*不能*添加Angular 2的指令。
|
||||
只有在`Ng2Component`组件的模板中才是Angular 2的天下。同样的规则也适用于在Angular 2中使用Angular 1组件型指令的情况。
|
||||
|
||||
:marked
|
||||
@ -1519,7 +1519,7 @@ code-example(format="").
|
||||
referred to in the template, but for the sake of clarity we want to define all the
|
||||
members our controller will have.
|
||||
|
||||
该类额外声明了三个成员:电话列表、当前排序键的名字和搜索条件。
|
||||
该类还声明了另外三个成员:电话列表、当前排序键的名字和搜索条件。
|
||||
这些东西我们以前就加到了控制器上,只是从来没有在任何地方显式定义过它们。最后一个成员从未真正在TypeScript代码中用过,
|
||||
因为它只是在模板中被引用过。但为了清晰起见,我们还是应该定义出此控制器应有的所有成员。
|
||||
|
||||
|
@ -560,7 +560,7 @@ a(id="production-configuration")
|
||||
|
||||
There are additional plugins:
|
||||
|
||||
还有一些额外的插件:
|
||||
还有一些别的插件:
|
||||
|
||||
* **NoErrorsPlugin** - stops the build if there is any error.
|
||||
* **NoErrorsPlugin** - 如果出现任何错误,就终止构建。
|
||||
|
@ -146,7 +146,7 @@ block package-and-config-files
|
||||
#[b typings.json] provides additional definition files for libraries that the TypeScript
|
||||
compiler doesn't natively recognize.
|
||||
li.
|
||||
#[b typings.json]为那些TypeScript编译器无法识别的库提供了额外的定义文件。
|
||||
#[b typings.json]为那些TypeScript编译器无法识别的库提供了别的定义文件。
|
||||
li.
|
||||
#[b systemjs.config.js] provides information to a module loader about where to find
|
||||
application modules, and registers all the necessary packages. It also
|
||||
|
Loading…
x
Reference in New Issue
Block a user