From eb73ad00271b2e41abf255116b7b1eaea6e2e25c Mon Sep 17 00:00:00 2001
From: Zhicheng Wang
",
+ "translation": "Angular 支持**数据绑定**,一种让模板的各部分与组件的各部分相互合作的机制。\n我们往模板 HTML 中添加绑定标记,来告诉 Angular 如何把二者联系起来。As the diagram shows, there are four forms of data binding syntax. Each form has a direction — to the DOM, from the DOM, or in both directions.如图所示,数据绑定的语法有四种形式。每种形式都有一个方向 —— 绑定到 DOM 、绑定自 DOM 以及双向绑定。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/architecture.md"
},
{
@@ -2431,7 +2421,7 @@
},
{
"original": "_Dependency injection_ is a way to supply a new instance of a class\nwith the fully-formed dependencies it requires. Most dependencies are services.\nAngular uses dependency injection to provide new components with the services they need.",
- "translation": "“依赖注入”是提供类的新实例的一种方式,还负责处理好类所需的全部依赖。大多数依赖都是服务。\nAngular 使用依赖注入来提供新组件以及组件所需的服务。
",
+ "translation": "“依赖注入”是提供类的新实例的一种方式,还负责处理好类所需的全部依赖。大多数依赖都是服务。\nAngular 使用依赖注入来提供新组件以及组件所需的服务。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/architecture.md"
},
{
@@ -2790,7 +2780,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/attribute-directives.md"
},
{
- "original": "Put the template in its own app.component.html
\nfile that looks like this:",
+ "original": "file that looks like this:",
"translation": "我们把这个模板放到它的app.component.html
文件中,就像这样:",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/attribute-directives.md"
},
@@ -3380,13 +3370,13 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md"
},
{
- "original": "
\n 最新版", + "original": "latest", + "translation": "最新版", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "
", - "translation": "\n 最新版", + "original": "latest", + "translation": "最新版", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { @@ -3394,11 +3384,6 @@ "translation": "Angular 在持续集成过程中,对每一个提交都会使用 SauceLabs 和\nBrowserstack 在上述所有浏览器上执行单元测试。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, - { - "original": "", - "translation": "## Polyfills #\n## 填充库 (polyfill) #\nAngular is built on the latest standards of the web platform.\nTargeting such a wide range of browsers is challenging because they do not support all features of modern browsers.", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" - }, { "original": "You can compensate by loading polyfill scripts (\"polyfills\") on the host web page (`index.html`)\nthat implement missing features in JavaScript.", "translation": "你可以通过在宿主页面 (`index.html`) 中加载填充脚本 (“polyfills”) 来加以弥补,这些脚本实现了浏览器缺失的 JavaScript 特性。", @@ -3420,23 +3405,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "", - "translation": "### Mandatory polyfills ##\n### 强制性填充库 ##\nThese are the polyfills required to run an Angular application on each supported browser:", + "original": "Browsers (Desktop & Mobile)", + "translation": "浏览器(桌面和移动)", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "
", - "translation": "\n 浏览器(桌面和移动)", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" - }, - { - "original": "
", - "translation": "\n 需要的填充库", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" - }, - { - "original": "", - "translation": "### Optional browser features to polyfill ##\n### 可选浏览器特性的填充库 ##\nSome features of Angular may require additional polyfills.", + "original": "Polyfills Required", + "translation": "需要的填充库", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { @@ -3455,17 +3430,17 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "
\n 填充库", + "original": "Licence", + "translation": "授权方式", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "
", - "translation": "\n 授权方式", + "original": "Size*", + "translation": "大小*", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "
", - "translation": "\n 大小*", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" - }, - { - "original": "
", - "translation": "\n 公共域", + "original": "Public domain", + "translation": "公共域", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { "original": "\\* Figures are for minified and gzipped code, \ncomputed with the closure compiler.", - "translation": "\\* 这些指标测量的是最小化 (minify) 并且 gzip 过的代码,使用 closure compiler\n计算出的结果。", + "translation": "\\* 这些指标测量的是最小化 (minify) 并且 gzip 过的代码,使用", + "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" + }, + { + "original": "closure compiler", + "translation": "计算出的结果。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { @@ -3810,7 +3785,7 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/change-log.md" }, { - "original": "This change supports ES6 developers and aligns better with typical Angular libraries.\nIt does not affect the module's API but it does affect how you load and import it.\nSee the change note\nin the `in-memory-web-api` repo.", + "original": "in the `in-memory-web-api` repo.", "translation": "这个变化支持ES6开发者,并与典型的Angular库看齐。\n它不会影响模块的API,但是它改变了加载和导入它的方式。\n参见`in-memory-web-api`库的变更记录。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/change-log.md" }, @@ -3949,401 +3924,61 @@ "translation": "启动", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, - { - "original": "
Bootstraps the app, using the root component from the specified NgModule
.
NgModule
中指定的根组件进行启动。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "NgModules
", - "translation": "Angular 模块", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "Defines a module that contains components, directives, pipes, and providers.
", - "translation": "定义一个模块,其中可以包含组件、指令、管道和服务提供商。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "List of components, directives, and pipes that belong to this module.
", - "translation": "属于当前模块的组件、指令和管道的列表。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "imports: [BrowserModule, SomeOtherModule]
List of modules to import into this module. Everything from the imported modules\nis available to declarations
of this module.
List of components, directives, and pipes visible to modules that import this module.
", - "translation": "那些导入了本模块的模块所能看到的组件、指令和管道的列表", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "List of dependency injection providers visible both to the contents of this module and to importers of this module.
", - "translation": "依赖注入提供商的列表,本模块以及本模块导入的所有模块中的内容都可以看见它们。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "List of components to bootstrap when this module is bootstrapped.
", - "translation": "当本模块启动时,随之启动的组件列表。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, { "original": "Template syntax", "translation": "模板语法", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, - { - "original": "Binds property value
to the result of expression firstName
.
value
属性绑定到表达式firstName
",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Binds attribute role
to the result of expression myAriaRole
.
role
绑定到表达式myAriaRole
的结果。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Binds the presence of the CSS class extra-sparkle
on the element to the truthiness of the expression isDelightful
.
isDelightful
表达式的结果是否为真,决定CSS类extra-sparkle
是否出现在当前元素上。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Binds style property width
to the result of expression mySize
in pixels. Units are optional.
width
的px(像素)值绑定到表达式mySize
的结果。单位是可选的。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Calls method readRainbow
when a click event is triggered on this button element (or its children) and passes in the event object.
readRainbow
,并把这个事件对象作为参数传进去。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "<div [title]=\"'Hello ' + ponyName\">
",
- "translation": "把一个属性绑定到插值字符串(如\"Hello Seabiscuit\")。这种写法等价于<div [title]=\"'Hello ' + ponyName\">
",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Binds text content to an interpolated string, for example, \"Hello Seabiscuit\".
", - "translation": "把文本内容绑定到插值字符串(如\"Hello Seabiscuit\")", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "Sets up two-way data binding. Equivalent to: <my-cmp [title]=\"name\" (titleChange)=\"name=$event\">
<my-cmp [title]=\"name\" (titleChange)=\"name=$event\">
。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Creates a local variable movieplayer
that provides access to the video
element instance in data-binding and event-binding expressions in the current template.
movieplayer
,支持在当前模板的数据绑定和事件绑定表达式中访问video
元素的实例。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "<template [myUnless]=\"myExpression\"><p>...</p></template>
",
- "translation": "星号*
会把当前元素转换成内嵌式模板,等价于:<template [myUnless]=\"myExpression\"><p>...</p></template>
",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Transforms the current value of expression cardNumber
via the pipe called myCardNumberFormatter
.
myCardNumberFormatter
的管道对表达式cardNumber
的当前值进行变幻",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "The safe navigation operator (?
) means that the employer
field is optional and if undefined
, the rest of the expression should be ignored.
?
)表示employer
字段是可选的,如果它是 undefined
,那么表达式其余的部分就会被忽略,并返回 undefined
。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "An SVG snippet template needs an svg:
prefix on its root element to disambiguate the SVG element from an HTML component.
svg:
前缀,以便把 SVG 元素和 HTML 元素区分开。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "An <svg>
root element is detected as an SVG element automatically, without the prefix.
<svg>
作为根元素时会自动识别为 SVG 元素,不需要前缀。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
{
"original": "Built-in directives",
"translation": "内置指令",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
},
- {
- "original": "Removes or recreates a portion of the DOM tree based on the showSection
expression.
showSection
表达式的结果,移除或重新创建 DOM 树的一部分。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Turns the li element and its contents into a template, and uses that to instantiate a view for each item in list.
", - "translation": "把li元素及其内容变成一个模板,并使用这个模板为列表中的每一个条目实例化一个视图。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "Conditionally swaps the contents of the div by selecting one of the embedded templates based on the current value of conditionExpression
.
conditionExpression
的当前值选择一个嵌入式模板,并用它替换这个 div 的内容。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Binds the presence of CSS classes on the element to the truthiness of the associated map values. The right-hand expression should return {class-name: true/false} map.
", - "translation": "根据 map 中的 value 是否为真,来决定该元素上是否出现与 name 对应的 CSS 类。右侧的表达式应该返回一个形如{class-name: true/false}
的 map。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
{
"original": "Forms",
"translation": "表单",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
},
- {
- "original": "Provides two-way data-binding, parsing, and validation for form controls.
", - "translation": "为表单控件提供双向数据绑定、解析和验证功能。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, { "original": "Class decorators", "translation": "类装饰器(decorator)", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, - { - "original": "Declares that a class is a component and provides metadata about the component.
", - "translation": "声明一个类是组件,并提供该组件的元数据。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "Declares that a class is a directive and provides metadata about the directive.
", - "translation": "声明一个类是指令,并提供该指令的元数据。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "Declares that a class is a pipe and provides metadata about the pipe.
", - "translation": "声明一个类是管道,并提供该管道的元数据。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "", - "translation": "声明一个类具有一些依赖,当依赖注入器试图创建该类的实例时,应该把这些依赖注入到该类的构造函数中。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, { "original": "Directive configuration", "translation": "指令配置", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, - { - "original": "[attribute]
, .class
, and :not()
.",
- "translation": "指定一个 CSS 选择器,用于在模板中标记出该指令。支持的选择器类型包括:元素名
、[属性名]
, .类名
和 :not()
。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
{
"original": "Does not support parent-child relationship selectors.",
"translation": "但不支持指定父子关系的选择器。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
},
- {
- "original": "List of dependency injection providers for this directive and its children.
", - "translation": "该指令及其子指令的依赖注入提供商列表。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, { "original": "Component configuration", "translation": "组件配置", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, - { - "original": "@Component
extends @Directive
,\nso the @Directive
configuration applies to components as well",
- "translation": "@Component
继承自 @Directive
,因此 @Directive
的配置也能用于 @Component
。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "If set, the templateUrl
and styleUrl
are resolved relative to the component.
templateUrl
和 styleUrl
的路径就会相对于当前组件进行解析。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "List of dependency injection providers scoped to this component's view.
", - "translation": "依赖注入提供商列表,但它们的范围被限定为当前组件的视图。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "Inline template or external template URL of the component's view.
", - "translation": "当前组件视图的内联模板或外部模板的 URL 。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "List of inline CSS styles or external stylesheet URLs for styling the component’s view.
", - "translation": "用于为当前组件的视图提供样式的内联 CSS 或外部样式表 URL 的列表。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, { "original": "Class field decorators for directives and components", "translation": "给指令或组件类用的属性装饰器", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, - { - "original": "<my-cmp [myProperty]=\"someExpression\">
).",
- "translation": "声明一个输入属性,你可以通过属性绑定来更新它,如 <my-cmp [myProperty]=\"someExpression\">
。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Declares an output property that fires events that you can subscribe to with an event binding (example: <my-cmp (myEvent)=\"doSomething()\">
).
<my-cmp (myEvent)=\"doSomething()\">
)。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Binds a host element property (here, the CSS class valid
) to a directive/component property (isValid
).
valid
)绑定到指令或组件上的 isValid
属性。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Subscribes to a host element event (click
) with a directive/component method (onClick
), optionally passing an argument ($event
).
onClick
方法订阅宿主元素上的click
事件,并从中获取$event
参数(可选)",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Binds the first result of the component content query (myPredicate
) to a property (myChildComponent
) of the class.
myPredicate
)的第一个结果绑定到该类的 myChildComponent
属性上。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Binds the results of the component content query (myPredicate
) to a property (myChildComponents
) of the class.
myPredicate
)的全部结果绑定到该类的 myChildComponents
属性上",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Binds the first result of the component view query (myPredicate
) to a property (myChildComponent
) of the class. Not available for directives.
myPredicate
)的第一个结果绑定到该类的 myChildComponent
属性上。对指令无效。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Binds the results of the component view query (myPredicate
) to a property (myChildComponents
) of the class. Not available for directives.
myPredicate
)的全部结果绑定到该类的 myChildComponents
属性上。对指令无效。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
{
"original": "Directive and component change detection and lifecycle hooks",
"translation": "指令和组件的变更检测与生命周期钩子",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
},
- {
- "original": "",
- "translation": "由类的方法实现。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Called before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here.
", - "translation": "在任何其它生命周期钩子之前调用。可以用它来注入依赖项,但不要在这里做正事。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "Called after every change to input properties and before processing content or child views.
", - "translation": "每当输入属性发生变化时就会调用,但位于处理内容(ng-content
)或子视图之前。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Called after the constructor, initializing input properties, and the first call to ngOnChanges
.
ngOnChanges
之后调用。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Called every time that the input properties of a component or a directive are checked. Use it to extend change detection by performing a custom check.
", - "translation": "每当对组件或指令的输入属性进行变更检测时就会调用。可以用它来扩展变更检测逻辑,执行自定义的检测逻辑。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "Called after ngOnInit
when the component's or directive's content has been initialized.
ngOnInit
完成之后,当组件或指令的内容(ng-content
)已经初始化完毕时调用。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Called after every check of the component's or directive's content.
", - "translation": "每当组件或指令的内容(ng-content
)做变更检测时调用。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Called after ngAfterContentInit
when the component's view has been initialized. Applies to components only.
ngAfterContentInit
完毕,并且组件的视图已经初始化完毕时调用。只适用于组件。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Called after every check of the component's view. Applies to components only.
", - "translation": "当组件视图每次执行变更检测时调用。只适用于组件。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "Called once, before the instance is destroyed.
", - "translation": "只在实例被销毁前调用一次。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, { "original": "Dependency injection configuration", "translation": "依赖注入的配置", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, - { - "original": "Sets or overrides the provider for MyService
to the MyMockService
class.
MyService
的服务提供商设置或改写为 MyMockService
类。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Sets or overrides the provider for MyService
to the myFactory
factory function.
MyService
的服务提供商设置或改写为 myFactory
工厂函数。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "Sets or overrides the provider for MyValue
to the value 41
.
MyValue
的服务提供商改写为一个特定的值 41
。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
{
"original": "Routing and navigation",
"translation": "路由与导航",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
},
- {
- "original": "Configures routes for the application. Supports static, parameterized, redirect, and wildcard routes. Also supports custom route data and resolve.
", - "translation": "为该应用配置路由。支持静态、参数化、重定向和通配符路由。也支持自定义路由数据和解析(resolve)函数。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "Marks the location to load the component of the active route.
", - "translation": "标记出一个位置,用来加载活动路由的组件。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" - }, - { - "original": "Creates a link to a different view based on a route instruction consisting of a route path, required and optional parameters, query parameters, and a fragment. To navigate to a root route, use the /
prefix; for a child route, use the ./
prefix; for a sibling or parent, use the ../
prefix.
/
前缀;要导航到子路由,使用./
前缀;要导航到兄弟路由或父级路由,使用../
前缀。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "The provided classes are added to the element when the routerLink
becomes the current active route.
routerLink
指向的路由变成活动路由时,为当前元素添加一些类(比如这里的 active
)。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "An interface for defining a class that the router should call first to determine if it should activate this component. Should return a boolean or an Observable/Promise that resolves to a boolean.
", - "translation": "用来定义类的接口。路由器会首先调用本接口来决定是否激活该路由。应该返回一个boolean
或能解析成 boolean
的 Observable/Promise
。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "An interface for defining a class that the router should call first to determine if it should deactivate this component after a navigation. Should return a boolean or an Observable/Promise that resolves to a boolean.
", - "translation": "用来定义类的接口。路由器会在导航离开前首先调用本接口以决定是否取消激活本路由。应该返回一个boolean
或能解析成 boolean
的 Observable/Promise
。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "An interface for defining a class that the router should call first to determine if it should activate the child route. Should return a boolean or an Observable/Promise that resolves to a boolean.
", - "translation": "用来定义类的接口。路由器会首先调用本接口来决定是否激活一个子路由。应该返回一个boolean
或能解析成 boolean
的 Observable/Promise
。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "An interface for defining a class that the router should call first to resolve route data before rendering the route. Should return a value or an Observable/Promise that resolves to a value.
", - "translation": "用来定义类的接口。路由器会在渲染该路由之前,首先调用它来解析路由数据。应该返回一个值或能解析成值的Observable/Promise
。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
- {
- "original": "An interface for defining a class that the router should call first to check if the lazy loaded module should be loaded. Should return a boolean or an Observable/Promise that resolves to a boolean.
", - "translation": "用来定义类的接口。路由器会首先调用它来决定是否应该加载一个惰性加载模块。应该返回一个boolean
或能解析成 boolean
的 Observable/Promise
。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
- },
{
"original": "# Component Interaction",
"translation": "# 组件之间的交互",
@@ -5320,7 +4955,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection-in-action.md"
},
{
- "original": "See the \n 面向未来: 没有必要记得在后来添加依赖的时候添加 @Injectable()
。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md"
- },
- {
- "original": "
\n 一致性:所有的服务都遵循同样的规则,不需要考虑为什么某个地方少了一个。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md" - }, { "original": "Injectors are also responsible for instantiating components\nlike `HeroesComponent`. So why doesn't `HeroesComponent` have\n`@Injectable()`?", "translation": "注入器同时负责实例化像`HerosComponent`这样的组件。为什么不标记`HerosComponent`为`@Injectable()`呢?", @@ -6875,8 +6500,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md" }, { - "original": "
\n 如果依赖值不是一个类呢?有时候想要注入的东西是一个字符串,函数或者对象。", + "original": "What if the dependency value isn't a class? Sometimes the thing you want to inject is a\n string, function, or object.", + "translation": "如果依赖值不是一个类呢?有时候想要注入的东西是一个字符串,函数或者对象。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md" }, { - "original": "
", - "translation": "\n 应用程序经常为很多很小的因素定义配置对象(例如应用程序的标题或网络API终点的地址)。\n 但是这些配置对象不总是类的实例,它们可能是对象,如下面这个:",
+ "original": "Applications often define configuration objects with lots of small facts\n (like the title of the application or the address of a web API endpoint)\n but these configuration objects aren't always instances of a class.\n They can be object literals such as this one:",
+ "translation": "应用程序经常为很多很小的因素定义配置对象(例如应用程序的标题或网络API终点的地址)。\n 但是这些配置对象不总是类的实例,它们可能是对象,如下面这个:",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md"
},
{
@@ -7254,11 +6879,6 @@
"translation": "或者在 ngModule 中提供并注入这个配置对象,如`AppModule`。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md"
},
- {
- "original": "",
- "translation": "## Optional dependencies\n## 可选依赖",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md"
- },
{
"original": "The `HeroService` *requires* a `Logger`, but what if it could get by without\na `logger`?\nYou can tell Angular that the dependency is optional by annotating the\nconstructor argument with `@Optional()`:",
"translation": "`HeroService`*需要*一个`Logger`,但是如果想不提供 Logger 也能得到它,该怎么办呢?\n可以把构造函数的参数标记为`@Optional()`,告诉 Angular 该依赖是可选的:",
@@ -7664,14 +7284,9 @@
"translation": "### Webpack(与AOT)",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/deployment.md"
},
- {
- "original": "Webpack 2 is another\ngreat option for inlining templates and style-sheets, for bundling, minifying, and uglifying the application.\nThe \"[Webpack: an introduction](guide/webpack \"Webpack: an introduction\")\" guide will get you started\nusing webpack with Angular.",
- "translation": "Webpack 2是另一个选项,它可以内联模板、样式表、打包、最小化和混淆应用。\n\"[Webpack简介](guide/webpack \"Webpack: an introduction\")\"一章中将会教你如何配合Angular使用Webpack。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/deployment.md"
- },
{
"original": "Angular Ahead-of-Time Webpack Plugin.\nThis plugin transpiles the TypeScript application code,\nbundles lazy loaded `NgModules` separately,\nand performs AOT compilation — without any changes to the source code.",
- "translation": "考虑使用官方的\nAngular预编译插件来配置*Webpack*。\n这个插件会转译TypeScript代码、独立打包延迟加载的`NgModules`,而且不用对源码做任何修改就能执行AOT编译。",
+ "translation": "考虑使用官方的",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/deployment.md"
},
{
@@ -7724,11 +7339,6 @@
"translation": "如果我们能对“是什么导致了应用变慢”的问题有一个清晰、准确的理解,那就可以对优化什么、如何优化做出更好地决策了。\n真正的原因可能并不是你所想的那样。\n我们可能花费大量的时间和金钱去优化一些东西,但它却无法产生可感知的效果甚至让应用变得更慢。\n我们应该在那些最重要的环境中实际运行,来度量应用的实际行为。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/deployment.md"
},
- {
- "original": "",
- "translation": "Chrome开发工具的网络性能页是开始学习度量性能的好地方。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/deployment.md"
- },
{
"original": "The [WebPageTest](https://www.webpagetest.org/) tool is another good choice\nthat can also help verify that your deployment was successful.",
"translation": "[WebPageTest](https://www.webpagetest.org/)工具是另一个不错的选择,它能帮你验证你的部署是否成功了。",
@@ -7939,11 +7549,6 @@
"translation": "### 请求来自另一个服务器的服务(CORS)",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/deployment.md"
},
- {
- "original": "cross-origin resource sharing error when making a service request (typically a data service request).\nto a server other than the application's own host server.\nBrowsers forbid such requests unless the server permits them explicitly.",
- "translation": "Angular开发者在向与该应用的宿主服务器不同域的服务器发起请求时,可能会遇到一种跨域资源共享(CORS)错误。\n浏览器会阻止该请求,除非得到那台服务器的明确许可。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/deployment.md"
- },
{
"original": "There isn't anything the client application can do about these errors.\nThe server must be configured to accept the application's requests.\nRead about how to enable CORS for specific servers at\nenable-cors.org.",
"translation": "客户端应用对这种错误无能为力。\n服务器必须配置成可以接受来自该应用的请求。\n要了解如何对特定的服务器开启CORS,参见enable-cors.org。",
@@ -8310,7 +7915,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/dynamic-component-loader.md"
},
{
- "original": "See the
\n 状态", + "original": "State", + "translation": "状态", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "
", - "translation": "\n 为真时的 CSS 类", + "original": "Class if true", + "translation": "为真时的 CSS 类", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "
", - "translation": "\n 为假时的 CSS 类", + "original": "Class if false", + "translation": "为假时的 CSS 类", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "
", - "translation": "\n 控件被访问过。", + "original": "The control has been visited.", + "translation": "控件被访问过。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "
", - "translation": "\n 控件的值变化了。", + "original": "The control's value has changed.", + "translation": "控件的值变化了。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "
", - "translation": "\n 控件的值有效。",
+ "original": "The control's value is valid.",
+ "translation": "控件的值有效。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md"
},
{
@@ -11785,7 +11390,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/i18n.md"
},
{
- "original": "Try this
\n 钩子", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" - }, - { - "original": "
", - "translation": "\n 目的和时机",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md"
- },
{
"original": "Respond when Angular (re)sets data-bound input properties.\n The method receives a `SimpleChanges` object of current and previous property values.",
"translation": "当Angular(重新)设置数据绑定输入属性时响应。\n 该方法接受当前和上一属性值的`SimpleChanges`对象",
@@ -13080,7 +12675,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md"
},
{
- "original": "The
\n 组件", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" - }, - { - "original": "
", - "translation": "\n 描述", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" - }, { "original": "Demonstrates every lifecycle hook.\n Each hook method writes to the on-screen log.", "translation": "展示每个生命周期钩子,每个钩子方法都会在屏幕上显示一条日志。", @@ -13140,8 +12725,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" }, { - "original": "
", - "translation": "\n 计数器",
+ "original": "Counter",
+ "translation": "计数器",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md"
},
{
@@ -13219,11 +12804,6 @@
"translation": "不开玩笑了,注意下面两个关键点:",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md"
},
- {
- "original": "1. Angular calls hook methods for *directives* as well as components.
",
- "translation": "就像对组件一样,Angular也会对*指令*调用这些钩子方法。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md"
- },
{
"original": "2. A spy directive can provide insight into a DOM object that you cannot change directly.\nObviously you can't touch the implementation of a native `
\n 特性模块", + "original": "Feature Module", + "translation": "特性模块", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 指导原则", + "original": "Guidelines", + "translation": "指导原则", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 领域", + "original": "Domain", + "translation": "领域", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14575,8 +14155,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 路由特性模块", + "original": "Routed", + "translation": "路由特性模块", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14620,8 +14200,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 路由模块", + "original": "Routing", + "translation": "路由模块", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14695,8 +14275,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 服务", + "original": "Service", + "translation": "服务", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14720,8 +14300,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 窗口部件", + "original": "Widget", + "translation": "窗口部件", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14760,153 +14340,143 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 特性模块", + "original": "Feature Module", + "translation": "特性模块", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 声明`declarations`", + "original": "Declarations", + "translation": "声明`declarations`", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 提供商`providers`", + "original": "Providers", + "translation": "提供商`providers`", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 导出什么", + "original": "Exports", + "translation": "导出什么", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 被谁导入", + "original": "Imported By", + "translation": "被谁导入", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 范例", + "original": "Examples", + "translation": "范例", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 领域", + "original": "Domain", + "translation": "领域", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 有", + "original": "Yes", + "translation": "有", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 罕见", + "original": "Rare", + "translation": "罕见", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 顶级组件", + "original": "Top component", + "translation": "顶级组件", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 特性模块和AppModule
",
+ "original": "Routed",
+ "translation": "路由",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md"
},
{
- "original": "
\n ContactModule
(路由之前的那个例子)",
+ "original": "Yes",
+ "translation": "有",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md"
},
{
- "original": "
\n 路由", + "original": "Rare", + "translation": "罕见", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 有", + "original": "No", + "translation": "无", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 罕见", + "original": "Nobody", + "translation": "无", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 无", + "original": "Routing", + "translation": "路由", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 无", + "original": "No", + "translation": "无", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 路由", + "original": "Yes", + "translation": "有", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 无", + "original": "No", + "translation": "无", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 有", + "original": "Service", + "translation": "服务", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 无", + "original": "No", + "translation": "无", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 服务", + "original": "Yes", + "translation": "有", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 无", + "original": "No", + "translation": "无", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 有", + "original": "Widget", + "translation": "窗口部件", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 无", + "original": "Yes", + "translation": "有", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 窗口部件", + "original": "Rare", + "translation": "罕见", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 有", + "original": "Yes", + "translation": "有", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 罕见", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" - }, - { - "original": "
", - "translation": "\n 有", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" - }, - { - "original": "
", - "translation": "\n 特性模块", + "original": "Feature", + "translation": "特性模块", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -15060,13 +14630,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 属性", + "original": "Property", + "translation": "属性", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
", - "translation": "\n 描述",
+ "original": "Description",
+ "translation": "描述",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md"
},
{
@@ -15349,31 +14919,6 @@
"translation": "本章通过一个基于《英雄指南》的渐进式例子解释了 Angular 的模块。这里是例子演化过程中一些关键节点的在线例子。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule.md"
},
- {
- "original": "*
\n 属性", + "original": "Property", + "translation": "属性", "sourceFile": "/Users/twer/private/GDE/content-1/guide/reactive-forms.md" }, { - "original": "
", - "translation": "\n 说明", + "original": "Description", + "translation": "说明", "sourceFile": "/Users/twer/private/GDE/content-1/guide/reactive-forms.md" }, { @@ -19645,7 +19130,7 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "
\n 路由器部件", + "original": "Router Part", + "translation": "路由器部件", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "
", - "translation": "\n 含义", + "original": "Meaning", + "translation": "含义", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "
", - "translation": "\n 为激活的URL显示应用组件。管理从一个组件到另一个组件的导航", + "original": "Displays the application component for the active URL.\n Manages navigation from one component to the next.", + "translation": "为激活的URL显示应用组件。管理从一个组件到另一个组件的导航", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "
", - "translation": "\n 一个独立的Angular模块,用于提供所需的服务提供商,以及用来在应用视图之间进行导航的指令。", + "original": "A separate NgModule that provides the necessary service providers\n and directives for navigating through application views.", + "translation": "一个独立的Angular模块,用于提供所需的服务提供商,以及用来在应用视图之间进行导航的指令。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "
", - "translation": "\n 定义了一个路由数组,每一个都会把一个URL路径映射到一个组件。", + "original": "Defines an array of Routes, each mapping a URL path to a component.", + "translation": "定义了一个路由数组,每一个都会把一个URL路径映射到一个组件。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "
", - "translation": "\n 定义路由器该如何根据URL模式(pattern)来导航到组件。大多数路由都由路径和组件类构成。", + "original": "Defines how the router should navigate to a component based on a URL pattern.\n Most routes consist of a path and a component type.", + "translation": "定义路由器该如何根据URL模式(pattern)来导航到组件。大多数路由都由路径和组件类构成。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "
", - "translation": "\n 该指令(<router-outlet>
)用来标记出路由器该在哪里显示视图。",
+ "original": "The directive (<router-outlet>
) that marks where the router displays a view.",
+ "translation": "该指令(<router-outlet>
)用来标记出路由器该在哪里显示视图。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md"
},
{
- "original": "
\n 该指令用来把一个可点击的HTML元素绑定到路由。\n 点击带有绑定到字符串或链接参数数组的routerLink
指令的元素就会触发一次导航。",
+ "original": "The directive for binding a clickable HTML element to\n a route. Clicking an element with a routerLink
directive\n that is bound to a link parameters array triggers a navigation.",
+ "translation": "该指令用来把一个可点击的HTML元素绑定到路由。\n 点击带有绑定到字符串或链接参数数组的routerLink
指令的元素就会触发一次导航。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md"
},
{
- "original": "
\n 当HTML元素上或元素内的routerLink
变为激活或非激活状态时,该指令为这个HTML元素添加或移除CSS类。",
+ "original": "The directive for adding/removing classes from an HTML element when an associated\n routerLink
contained on or inside the element becomes active/inactive.",
+ "translation": "当HTML元素上或元素内的routerLink
变为激活或非激活状态时,该指令为这个HTML元素添加或移除CSS类。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md"
},
{
- "original": "
\n 为每个路由组件提供提供的一个服务,它包含特定于路由的信息,比如路由参数、静态数据、解析数据、全局查询参数和全局碎片(fragment)。", + "original": "A service that is provided to each route component that contains route specific\n information such as route parameters, static data, resolve data, global query params, and the global fragment.", + "translation": "为每个路由组件提供提供的一个服务,它包含特定于路由的信息,比如路由参数、静态数据、解析数据、全局查询参数和全局碎片(fragment)。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "
", - "translation": "\n 路由器的当前状态包含了一棵由程序中激活的路由构成的树。它包含一些用于遍历路由树的快捷方法。", + "original": "The current state of the router including a tree of the currently activated\n routes together with convenience methods for traversing the route tree.", + "translation": "路由器的当前状态包含了一棵由程序中激活的路由构成的树。它包含一些用于遍历路由树的快捷方法。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md" }, { - "original": "
", - "translation": "\n 这个数组会被路由器解释成一个路由操作指南。我们可以把一个RouterLink
绑定到该数组,或者把它作为参数传给Router.navigate
方法。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md"
- },
- {
- "original": "
\n 一个带有RouterOutlet
的Angular组件,它根据路由器的导航来显示相应的视图。",
+ "original": "An array that the router interprets as a routing instruction.\n You can bind that array toa RouterLink
or pass the array as an argument to\n the Router.navigate
method.",
+ "translation": "这个数组会被路由器解释成一个路由操作指南。我们可以把一个RouterLink
绑定到该数组,或者把它作为参数传给Router.navigate
方法。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md"
},
{
@@ -20940,7 +20420,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/router.md"
},
{
- "original": "