diff --git a/aio/content/guide/architecture.md b/aio/content/guide/architecture.md index 937e1d868b..5d16cf31db 100644 --- a/aio/content/guide/architecture.md +++ b/aio/content/guide/architecture.md @@ -184,6 +184,7 @@ JavaScript 中,每个_文件_是一个模块,文件中定义的所有对象 Learn more about the JavaScript module system on the web. + 学习更多关于 JavaScript 模块的知识。 @@ -245,6 +246,7 @@ Hang in there. The confusion yields to clarity with time and experience. Learn more from the [NgModules](guide/ngmodules) page. + 更多信息,见 [Angular 模块](guide/ngmodule)。 diff --git a/aio/content/guide/npm-packages.md b/aio/content/guide/npm-packages.md index 9a008baf2e..973127a0ea 100644 --- a/aio/content/guide/npm-packages.md +++ b/aio/content/guide/npm-packages.md @@ -19,6 +19,7 @@ The Angular CLI uses `yarn` by default to install npm packages when you create a
", - "translation": "### none\n ### 没了\n For performance reasons, no comparable pipe exists in Angular. Do all your filtering in the component. If you need the same filtering code in several templates, consider building a custom pipe.", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md" - }, - { - "original": "### none\n ### 没了\n For performance reasons, no comparable pipe exists in Angular. Do all your filtering in the component. If you need the same filtering code in several templates, consider building a custom pipe.", - "translation": "在Angular中,出于性能的考虑,并没有一个类似的管道。\n 过滤逻辑应该在组件中用代码实现。\n 如果它将被复用在几个模板中,可以考虑构建一个自定义管道。", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md" - }, { "original": "Converts a JavaScript object into a JSON string. This is useful for debugging.", "translation": "把一个JavaScript对象转换成一个JSON字符串。这对调试很有用。", @@ -586,17 +576,17 @@ }, { "original": "The Angular `json` pipe does the same thing.", - "translation": "Angular的`json`管道做完全相同的事。\n | ", + "translation": "Angular的`json`管道做完全相同的事。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md" }, { "original": "Selects up to the first parameter (2) number of items from the collection\n starting (optionally) at the beginning index (0).", - "translation": "从集合中选择从(第二参数指定的)起始索引号(0)开始的最多(第一参数指定的)条目数(2)个条目。\n ", + "translation": "从集合中选择从(第二参数指定的)起始索引号(0)开始的最多(第一参数指定的)条目数(2)个条目。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md" }, { "original": "The `SlicePipe` does the same thing but the *order of the parameters is reversed*, in keeping\n with the JavaScript `Slice` method.\n The first parameter is the starting index; the second is the limit.\n As in AngularJS, coding this operation within the component instead could improve performance.", - "translation": "`SlicePipe`做同样的事,但是*两个参数的顺序是相反的*,以便于JavaScript中的`slice`方法保持一致。\n 第一个参数是起始索引号,第二个参数是限制的数量。\n 和AngularJS中一样,如果们改用组件中的代码实现此操作,性能将会提升。\n ", + "translation": "`SlicePipe`做同样的事,但是*两个参数的顺序是相反的*,以便于JavaScript中的`slice`方法保持一致。\n 第一个参数是起始索引号,第二个参数是限制的数量。\n 和AngularJS中一样,如果们改用组件中的代码实现此操作,性能将会提升。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md" }, { @@ -606,7 +596,7 @@ }, { "original": "The Angular `lowercase` pipe does the same thing.", - "translation": "Angular的`lowercase`管道和1中的功能完全相同。\n ", + "translation": "Angular的`lowercase`管道和1中的功能完全相同。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md" }, { @@ -621,22 +611,12 @@ }, { "original": "Angular also has a `percent` pipe, which formats a number as a local percentage\n as shown in the third example.", - "translation": "Angular还有一个`percent`管道,它把一个数组格式化为本地化的(local)百分比格式,如第三个范例所示。\n ", + "translation": "Angular还有一个`percent`管道,它把一个数组格式化为本地化的(local)百分比格式,如第三个范例所示。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md" }, { "original": "Displays the collection in the order specified by the expression.\n In this example, the movie title orders the `movieList`.", - "translation": "使用表达式中所指定的方式对集合进行排序。\n 在这个例子中,`movieList`被根据movie的title排序了。\n ", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md" - }, - { - "original": "", - "translation": "### none\n ### 没了\n For performance reasons, no comparable pipe exists in Angular.\n Instead, use component code to order or sort results. If you need the same ordering or sorting code in several templates, consider building a custom pipe.", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md" - }, - { - "original": "### none\n ### 没了\n For performance reasons, no comparable pipe exists in Angular.\n Instead, use component code to order or sort results. If you need the same ordering or sorting code in several templates, consider building a custom pipe.", - "translation": "在Angular中,出于性能的考虑,并没有一个类似的管道。\n 排序逻辑应该在组件中用代码实现。\n 如果它将被复用在几个模板中,可以考虑构建一个自定义管道。", + "translation": "使用表达式中所指定的方式对集合进行排序。\n 在这个例子中,`movieList`被根据movie的title排序了。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md" }, { @@ -686,7 +666,7 @@ }, { "original": "In AngularJS, an Angular module keeps track of controllers, services, and other code. \n The second argument defines the list of other modules that this module depends upon.", - "translation": "在AngularJS中,Angular模块用来对控制器、服务和其它代码进行跟踪。第二个参数定义该模块依赖的其它模块列表。\n | ", + "translation": "在AngularJS中,Angular模块用来对控制器、服务和其它代码进行跟踪。第二个参数定义该模块依赖的其它模块列表。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md" }, { @@ -709,11 +689,6 @@ "translation": "要了解关于模块的更多知识,参见[NgModules](guide/ngmodule)。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md" }, - { - "original": "",
- "translation": "### Controller registration\n### 控制器注册 | ",
+ "translation": "在Angular1中,我们在控制器函数中写模型和方法的代码。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md"
},
{
@@ -771,7 +746,7 @@
},
{
"original": "For more information, see the [Components](guide/architecture#components) \n section of the [Architecture Overview](guide/architecture) page.",
- "translation": "要了解关于组件的更多信息,参见[架构概览](guide/architecture)中的[组件](guide/architecture#components)部分。\n ",
+ "translation": "要了解关于组件的更多信息,参见[架构概览](guide/architecture)中的[组件](guide/architecture#components)部分。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md"
},
{
@@ -801,7 +776,7 @@
},
{
"original": "For more information, see the [Dependency injection](guide/architecture#dependency-injection) \n section of the [Architecture Overview](guide/architecture).",
- "translation": "要了解关于依赖注入的更多信息,参见[架构概览](guide/architecture)中的[依赖注入](guide/architecture#dependency-injection)部分。\n ",
+ "translation": "要了解关于依赖注入的更多信息,参见[架构概览](guide/architecture)中的[依赖注入](guide/architecture#dependency-injection)部分。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md"
},
{
@@ -816,7 +791,7 @@
},
{
"original": "AngularJS, uses a `link` tag in the head section of the `index.html` file\n to define the styles for the application.",
- "translation": "在AngularJS中,我们在`index.html`的`head`区使用`link`标签来为应用程序定义样式。\n ",
+ "translation": "在AngularJS中,我们在`index.html`的`head`区使用`link`标签来为应用程序定义样式。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/ajs-quick-reference.md"
},
{
@@ -849,11 +824,6 @@
"translation": "动画是现代Web应用设计中一个很重要的方面。我们希望用户界面能在不同的状态之间更平滑的转场。如果需要,还可以用适当的动画来吸引注意力。\n设计良好的动画不但会让UI更有趣,还会让它更容易使用。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/animations.md"
},
- {
- "original": "动画是现代Web应用设计中一个很重要的方面。我们希望用户界面能在不同的状态之间更平滑的转场。如果需要,还可以用适当的动画来吸引注意力。\n设计良好的动画不但会让UI更有趣,还会让它更容易使用。",
- "translation": "## Overview\n## 概述",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/animations.md"
- },
{
"original": "Angular's animation system lets you build animations that run with the same kind of native\nperformance found in pure CSS animations. You can also tightly integrate your\nanimation logic with the rest of your application code, for ease of control.",
"translation": "Angular的动画系统赋予了制作各种动画效果的能力,以构建出与原生CSS动画性能相同的动画。\n我们也获得了额外的让动画逻辑与其它应用代码紧紧集成在一起的能力,这让动画可以被更容易的触发与控制。",
@@ -1249,11 +1219,6 @@
"translation": "其中一个动画组对元素的`transform`和`width`做动画,另一个组则对`opacity`做动画。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/animations.md"
},
- {
- "original": "其中一个动画组对元素的`transform`和`width`做动画,另一个组则对`opacity`做动画。",
- "translation": "## Animation callbacks\n## 动画回调",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/animations.md"
- },
{
"original": "A callback is fired when an animation is started and also when it is done.",
"translation": "当动画开始和结束时,会触发一个回调。",
@@ -1479,11 +1444,6 @@
"translation": "如果你好奇,可以打开`aot/app.component.ngfactory.ts`来看看原始Angular模板语法被编译成TypeScript时的中间结果。JIT compilation generates these same _NgFactories_ in memory where they are largely invisible.\nAOT compilation reveals them as separate, physical files.",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/aot-compiler.md"
},
- {
- "original": "如果你好奇,可以打开`aot/app.component.ngfactory.ts`来看看原始Angular模板语法被编译成TypeScript时的中间结果。JIT compilation generates these same _NgFactories_ in memory where they are largely invisible.\nAOT compilation reveals them as separate, physical files.",
- "translation": "JIT编译器在内存中同样会生成这一堆*NgFactory*,但它们大部分是不可见的。\nAOT编译器则会生成在单独的物理文件中。",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/aot-compiler.md"
- },
{
"original": "Do not edit the _NgFactories_! Re-compilation replaces these files and all edits will be lost.",
"translation": "不要编辑这些*NgFactory*!重新编译时会替换这些文件,你做的所有修改都会丢失。",
@@ -1825,20 +1785,10 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/aot-compiler.md"
},
{
- "original": "\n Feature", + "original": "Feature", "translation": "特性", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, @@ -3601,7 +3471,7 @@ }, { "original": "[Web Animations](guide/browser-support#web-animations)", - "translation": "[Web 动画](guide/browser-support#web-animations)\n ", + "translation": "[Web 动画](guide/browser-support#web-animations)", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { @@ -3615,18 +3485,18 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": " | \n All but Chrome, Firefox, Edge, IE11 and Safari 10 ", - "translation": "除了 Chrome、Firefox、Edge、IE11 和 Safari 10 外的所有浏览器 ", + "original": "All but Chrome, Firefox, Edge, IE11 and Safari 10", + "translation": "除了 Chrome、Firefox、Edge、IE11 和 Safari 10 外的所有浏览器", "sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md" }, { - "original": "[NgClass](api/common/NgClass) on SVG elements ", - "translation": "在 SVG 元素上应用 [NgClass](api/common/NgClass) \n | ",
+ "original": "[NgClass](api/common/NgClass) on SVG elements",
+ "translation": "在 SVG 元素上应用 [NgClass](api/common/NgClass)",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/browser-support.md"
},
{
- "original": "
---|
\n Bootstrapping \n启动 \n | \n
| \n
---|---|
platformBrowserDynamic().bootstrapModule(AppModule); | \nBootstraps the app, using the root component from the specified 用 | \n
\n Bootstrapping \n启动 \n | \n
| \n
---|---|
platformBrowserDynamic().bootstrapModule(AppModule); | \nBootstraps the app, using the root component from the specified 用 | \n
NgModules \nAngular 模块 \n | \n
| \n
---|---|
@NgModule({ declarations: ..., imports: ..., | \nDefines a module that contains components, directives, pipes, and providers. \n定义一个模块,其中可以包含组件、指令、管道和服务提供商。 \n | \n
declarations: [MyRedComponent, MyBlueComponent, MyDatePipe] | \nList of components, directives, and pipes that belong to this module. \n属于当前模块的组件、指令和管道的列表。 \n | \n
imports: [BrowserModule, SomeOtherModule] | \nList of modules to import into this module. Everything from the imported modules\nis available to 本模块所导入的模块列表 \n | \n
exports: [MyRedComponent, MyDatePipe] | \nList of components, directives, and pipes visible to modules that import this module. \n那些导入了本模块的模块所能看到的组件、指令和管道的列表 \n | \n
providers: [MyService, { provide: ... }] | \nList of dependency injection providers visible both to the contents of this module and to importers of this module. \n依赖注入提供商的列表,本模块以及本模块导入的所有模块中的内容都可以看见它们。 \n | \n
bootstrap: [MyAppComponent] | \nList of components to bootstrap when this module is bootstrapped. \n当本模块启动时,随之启动的组件列表。 \n | \n
Bootstraps the app, using the root component from the specified NgModule
.
NgModule
中指定的根组件进行启动。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
},
{
- "original": "NgModules \nAngular 模块 \n | \n
| \n
---|---|
@NgModule({ declarations: ..., imports: ..., | \nDefines a module that contains components, directives, pipes, and providers. \n定义一个模块,其中可以包含组件、指令、管道和服务提供商。 \n | \n
declarations: [MyRedComponent, MyBlueComponent, MyDatePipe] | \nList of components, directives, and pipes that belong to this module. \n属于当前模块的组件、指令和管道的列表。 \n | \n
imports: [BrowserModule, SomeOtherModule] | \nList of modules to import into this module. Everything from the imported modules\nis available to 本模块所导入的模块列表 \n | \n
exports: [MyRedComponent, MyDatePipe] | \nList of components, directives, and pipes visible to modules that import this module. \n那些导入了本模块的模块所能看到的组件、指令和管道的列表 \n | \n
providers: [MyService, { provide: ... }] | \nList of dependency injection providers visible both to the contents of this module and to importers of this module. \n依赖注入提供商的列表,本模块以及本模块导入的所有模块中的内容都可以看见它们。 \n | \n
bootstrap: [MyAppComponent] | \nList of components to bootstrap when this module is bootstrapped. \n当本模块启动时,随之启动的组件列表。 \n | \n
\n Template syntax \n模板语法 \n | \n\n |
---|---|
<input [value]=\"firstName\"> | \nBinds property 把 | \n
<div [attr.role]=\"myAriaRole\"> | \nBinds attribute 把属性(Attribute) | \n
<div [class.extra-sparkle]=\"isDelightful\"> | \nBinds the presence of the CSS class 根据 | \n
<div [style.width.px]=\"mySize\"> | \nBinds style property 把CSS样式属性 | \n
<button (click)=\"readRainbow($event)\"> | \nCalls method 当这个按钮元素(及其子元素)上的click事件触发时,调用方法 | \n
<div title=\"Hello {{ponyName}}\"> | \nBinds a property to an interpolated string, for example, \"Hello Seabiscuit\". Equivalent to:\n 把一个属性绑定到插值字符串(如\"Hello Seabiscuit\")。这种写法等价于 | \n
<p>Hello {{ponyName}}</p> | \nBinds text content to an interpolated string, for example, \"Hello Seabiscuit\". \n把文本内容绑定到插值字符串(如\"Hello Seabiscuit\") \n | \n
<my-cmp [(title)]=\"name\"> | \nSets up two-way data binding. Equivalent to: 设置双向绑定。等价于 | \n
<video #movieplayer ...> | \nCreates a local variable 创建一个局部变量 | \n
<p *myUnless=\"myExpression\">...</p> | \nThe 星号 | \n
<p>Card No.: {{cardNumber | myCardNumberFormatter}}</p> | \nTransforms the current value of expression 使用名叫 | \n
<p>Employer: {{employer?.companyName}}</p> | \nThe safe navigation operator ( 安全导航操作符( | \n
<svg:rect x=\"0\" y=\"0\" width=\"100\" height=\"100\"/> | \nAn SVG snippet template needs an 模板中的 SVG 片段需要给它的根元素加上 | \n
<svg> | \nAn 以 | \n
NgModules
", + "translation": "Angular 模块", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "\n Template syntax \n模板语法 \n | \n\n |
---|---|
<input [value]=\"firstName\"> | \nBinds property 把 | \n
<div [attr.role]=\"myAriaRole\"> | \nBinds attribute 把属性(Attribute) | \n
<div [class.extra-sparkle]=\"isDelightful\"> | \nBinds the presence of the CSS class 根据 | \n
<div [style.width.px]=\"mySize\"> | \nBinds style property 把CSS样式属性 | \n
<button (click)=\"readRainbow($event)\"> | \nCalls method 当这个按钮元素(及其子元素)上的click事件触发时,调用方法 | \n
<div title=\"Hello {{ponyName}}\"> | \nBinds a property to an interpolated string, for example, \"Hello Seabiscuit\". Equivalent to:\n 把一个属性绑定到插值字符串(如\"Hello Seabiscuit\")。这种写法等价于 | \n
<p>Hello {{ponyName}}</p> | \nBinds text content to an interpolated string, for example, \"Hello Seabiscuit\". \n把文本内容绑定到插值字符串(如\"Hello Seabiscuit\") \n | \n
<my-cmp [(title)]=\"name\"> | \nSets up two-way data binding. Equivalent to: 设置双向绑定。等价于 | \n
<video #movieplayer ...> | \nCreates a local variable 创建一个局部变量 | \n
<p *myUnless=\"myExpression\">...</p> | \nThe 星号 | \n
<p>Card No.: {{cardNumber | myCardNumberFormatter}}</p> | \nTransforms the current value of expression 使用名叫 | \n
<p>Employer: {{employer?.companyName}}</p> | \nThe safe navigation operator ( 安全导航操作符( | \n
<svg:rect x=\"0\" y=\"0\" width=\"100\" height=\"100\"/> | \nAn SVG snippet template needs an 模板中的 SVG 片段需要给它的根元素加上 | \n
<svg> | \nAn 以 | \n
\n Built-in directives \n内置指令 \n | \n
| \n
---|---|
<section *ngIf=\"showSection\"> | \nRemoves or recreates a portion of the DOM tree based on the 根据 | \n
<li *ngFor=\"let item of list\"> | \nTurns the li element and its contents into a template, and uses that to instantiate a view for each item in list. \n把li元素及其内容变成一个模板,并使用这个模板为列表中的每一个条目实例化一个视图。 \n | \n
<div [ngSwitch]=\"conditionExpression\"> | \nConditionally swaps the contents of the div by selecting one of the embedded templates based on the current value of 根据 | \n
<div [ngClass]=\"{'active': isActive, 'disabled': isDisabled}\"> | \nBinds 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. \n根据 map 中的 value 是否为真,来决定该元素上是否出现与 name 对应的 CSS 类。右侧的表达式应该返回一个形如 | \n
Defines a module that contains components, directives, pipes, and providers.
", + "translation": "定义一个模块,其中可以包含组件、指令、管道和服务提供商。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "\n Built-in directives \n内置指令 \n | \n
| \n
---|---|
<section *ngIf=\"showSection\"> | \nRemoves or recreates a portion of the DOM tree based on the 根据 | \n
<li *ngFor=\"let item of list\"> | \nTurns the li element and its contents into a template, and uses that to instantiate a view for each item in list. \n把li元素及其内容变成一个模板,并使用这个模板为列表中的每一个条目实例化一个视图。 \n | \n
<div [ngSwitch]=\"conditionExpression\"> | \nConditionally swaps the contents of the div by selecting one of the embedded templates based on the current value of 根据 | \n
<div [ngClass]=\"{'active': isActive, 'disabled': isDisabled}\"> | \nBinds 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. \n根据 map 中的 value 是否为真,来决定该元素上是否出现与 name 对应的 CSS 类。右侧的表达式应该返回一个形如 | \n
\n Forms \n表单 \n | \n
| \n
---|---|
<input [(ngModel)]=\"userName\"> | \nProvides two-way data-binding, parsing, and validation for form controls. \n为表单控件提供双向数据绑定、解析和验证功能。 \n | \n
List of components, directives, and pipes that belong to this module.
", + "translation": "属于当前模块的组件、指令和管道的列表。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "\n Forms \n表单 \n | \n
| \n
---|---|
<input [(ngModel)]=\"userName\"> | \nProvides two-way data-binding, parsing, and validation for form controls. \n为表单控件提供双向数据绑定、解析和验证功能。 \n | \n
\n Class decorators \n类装饰器(decorator) \n | \n
| \n
---|---|
@Component({...}) | \nDeclares that a class is a component and provides metadata about the component. \n声明一个类是组件,并提供该组件的元数据。 \n | \n
@Directive({...}) | \nDeclares that a class is a directive and provides metadata about the directive. \n声明一个类是指令,并提供该指令的元数据。 \n | \n
@Pipe({...}) | \nDeclares that a class is a pipe and provides metadata about the pipe. \n声明一个类是管道,并提供该管道的元数据。 \n | \n
@Injectable() | \nDeclares that a class has dependencies that should be injected into the constructor when the dependency injector is creating an instance of this class.\n \n声明一个类具有一些依赖,当依赖注入器试图创建该类的实例时,应该把这些依赖注入到该类的构造函数中。 \n | \n
imports: [BrowserModule, SomeOtherModule]
List of modules to import into this module. Everything from the imported modules\nis available to declarations
of this module.
\n Class decorators \n类装饰器(decorator) \n | \n
| \n
---|---|
@Component({...}) | \nDeclares that a class is a component and provides metadata about the component. \n声明一个类是组件,并提供该组件的元数据。 \n | \n
@Directive({...}) | \nDeclares that a class is a directive and provides metadata about the directive. \n声明一个类是指令,并提供该指令的元数据。 \n | \n
@Pipe({...}) | \nDeclares that a class is a pipe and provides metadata about the pipe. \n声明一个类是管道,并提供该管道的元数据。 \n | \n
@Injectable() | \nDeclares that a class has dependencies that should be injected into the constructor when the dependency injector is creating an instance of this class.\n \n声明一个类具有一些依赖,当依赖注入器试图创建该类的实例时,应该把这些依赖注入到该类的构造函数中。 \n | \n
\n Directive configuration \n指令配置 \n | \n
| \n
---|---|
selector: '.cool-button:not(a)' | \nSpecifies a CSS selector that identifies this directive within a template. Supported selectors include 指定一个 CSS 选择器,用于在模板中标记出该指令。支持的选择器类型包括: Does not support parent-child relationship selectors. \n但不支持指定父子关系的选择器。 \n | \n
providers: [MyService, { provide: ... }] | \nList of dependency injection providers for this directive and its children. \n该指令及其子指令的依赖注入提供商列表。 \n | \n
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": "\n Directive configuration \n指令配置 \n | \n
| \n
---|---|
selector: '.cool-button:not(a)' | \nSpecifies a CSS selector that identifies this directive within a template. Supported selectors include 指定一个 CSS 选择器,用于在模板中标记出该指令。支持的选择器类型包括: Does not support parent-child relationship selectors. \n但不支持指定父子关系的选择器。 \n | \n
providers: [MyService, { provide: ... }] | \nList of dependency injection providers for this directive and its children. \n该指令及其子指令的依赖注入提供商列表。 \n | \n
\n Component configuration \n组件配置 \n | \n\n
| \n
---|---|
moduleId: module.id | \nIf set, the 如果设置了,那么 | \n
viewProviders: [MyService, { provide: ... }] | \nList of dependency injection providers scoped to this component's view. \n依赖注入提供商列表,但它们的范围被限定为当前组件的视图。 \n | \n
template: 'Hello {{name}}' | \nInline template or external template URL of the component's view. \n当前组件视图的内联模板或外部模板的 URL 。 \n | \n
styles: ['.primary {color: red}'] | \nList of inline CSS styles or external stylesheet URLs for styling the component’s view. \n用于为当前组件的视图提供样式的内联 CSS 或外部样式表 URL 的列表。 \n | \n
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": "\n Component configuration \n组件配置 \n | \n\n
| \n
---|---|
moduleId: module.id | \nIf set, the 如果设置了,那么 | \n
viewProviders: [MyService, { provide: ... }] | \nList of dependency injection providers scoped to this component's view. \n依赖注入提供商列表,但它们的范围被限定为当前组件的视图。 \n | \n
template: 'Hello {{name}}' | \nInline template or external template URL of the component's view. \n当前组件视图的内联模板或外部模板的 URL 。 \n | \n
styles: ['.primary {color: red}'] | \nList of inline CSS styles or external stylesheet URLs for styling the component’s view. \n用于为当前组件的视图提供样式的内联 CSS 或外部样式表 URL 的列表。 \n | \n
\n Class field decorators for directives and components \n给指令或组件类用的属性装饰器 \n | \n
| \n
---|---|
@Input() myProperty; | \nDeclares an input property that you can update via property binding (example:\n 声明一个输入属性,你可以通过属性绑定来更新它,如 | \n
@Output() myEvent = new EventEmitter(); | \nDeclares an output property that fires events that you can subscribe to with an event binding (example: 声明一个输出属性,它发出事件,你可以用事件绑定来订阅它们(如: | \n
@HostBinding('class.valid') isValid; | \nBinds a host element property (here, the CSS class 把宿主元素的一个属性(这里是 CSS 类 | \n
@HostListener('click', ['$event']) onClick(e) {...} | \nSubscribes to a host element event ( 用指令或组件上的 | \n
@ContentChild(myPredicate) myChildComponent; | \nBinds the first result of the component content query ( 把组件内容查询( | \n
@ContentChildren(myPredicate) myChildComponents; | \nBinds the results of the component content query ( 把组件内容查询( | \n
@ViewChild(myPredicate) myChildComponent; | \nBinds the first result of the component view query ( 把组件视图查询( | \n
@ViewChildren(myPredicate) myChildComponents; | \nBinds the results of the component view query ( 把组件视图查询( | \n
List of components to bootstrap when this module is bootstrapped.
", + "translation": "当本模块启动时,随之启动的组件列表。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md" }, { - "original": "\n Class field decorators for directives and components \n给指令或组件类用的属性装饰器 \n | \n
| \n
---|---|
@Input() myProperty; | \nDeclares an input property that you can update via property binding (example:\n 声明一个输入属性,你可以通过属性绑定来更新它,如 | \n
@Output() myEvent = new EventEmitter(); | \nDeclares an output property that fires events that you can subscribe to with an event binding (example: 声明一个输出属性,它发出事件,你可以用事件绑定来订阅它们(如: | \n
@HostBinding('class.valid') isValid; | \nBinds a host element property (here, the CSS class 把宿主元素的一个属性(这里是 CSS 类 | \n
@HostListener('click', ['$event']) onClick(e) {...} | \nSubscribes to a host element event ( 用指令或组件上的 | \n
@ContentChild(myPredicate) myChildComponent; | \nBinds the first result of the component content query ( 把组件内容查询( | \n
@ContentChildren(myPredicate) myChildComponents; | \nBinds the results of the component content query ( 把组件内容查询( | \n
@ViewChild(myPredicate) myChildComponent; | \nBinds the first result of the component view query ( 把组件视图查询( | \n
@ViewChildren(myPredicate) myChildComponents; | \nBinds the results of the component view query ( 把组件视图查询( | \n
\n Directive and component change detection and lifecycle hooks \n指令和组件的变更检测与生命周期钩子 \n | \n(implemented as class methods)\n \n由类的方法实现。 \n | \n
---|---|
constructor(myService: MyService, ...) { ... } | \nCalled before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here. \n在任何其它生命周期钩子之前调用。可以用它来注入依赖项,但不要在这里做正事。 \n | \n
ngOnChanges(changeRecord) { ... } | \nCalled after every change to input properties and before processing content or child views. \n每当输入属性发生变化时就会调用,但位于处理内容( | \n
ngOnInit() { ... } | \nCalled after the constructor, initializing input properties, and the first call to 在调用完构造函数、初始化完所有输入属性并首次调用过 | \n
ngDoCheck() { ... } | \nCalled 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. \n每当对组件或指令的输入属性进行变更检测时就会调用。可以用它来扩展变更检测逻辑,执行自定义的检测逻辑。 \n | \n
ngAfterContentInit() { ... } | \nCalled after
| \n
ngAfterContentChecked() { ... } | \nCalled after every check of the component's or directive's content. \n每当组件或指令的内容( | \n
ngAfterViewInit() { ... } | \nCalled after 当 | \n
ngAfterViewChecked() { ... } | \nCalled after every check of the component's view. Applies to components only. \n当组件视图每次执行变更检测时调用。只适用于组件。 \n | \n
ngOnDestroy() { ... } | \nCalled once, before the instance is destroyed. \n只在实例被销毁前调用一次。 \n | \n
\n Directive and component change detection and lifecycle hooks \n指令和组件的变更检测与生命周期钩子 \n | \n(implemented as class methods)\n \n由类的方法实现。 \n | \n
---|---|
constructor(myService: MyService, ...) { ... } | \nCalled before any other lifecycle hook. Use it to inject dependencies, but avoid any serious work here. \n在任何其它生命周期钩子之前调用。可以用它来注入依赖项,但不要在这里做正事。 \n | \n
ngOnChanges(changeRecord) { ... } | \nCalled after every change to input properties and before processing content or child views. \n每当输入属性发生变化时就会调用,但位于处理内容( | \n
ngOnInit() { ... } | \nCalled after the constructor, initializing input properties, and the first call to 在调用完构造函数、初始化完所有输入属性并首次调用过 | \n
ngDoCheck() { ... } | \nCalled 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. \n每当对组件或指令的输入属性进行变更检测时就会调用。可以用它来扩展变更检测逻辑,执行自定义的检测逻辑。 \n | \n
ngAfterContentInit() { ... } | \nCalled after
| \n
ngAfterContentChecked() { ... } | \nCalled after every check of the component's or directive's content. \n每当组件或指令的内容( | \n
ngAfterViewInit() { ... } | \nCalled after 当 | \n
ngAfterViewChecked() { ... } | \nCalled after every check of the component's view. Applies to components only. \n当组件视图每次执行变更检测时调用。只适用于组件。 \n | \n
ngOnDestroy() { ... } | \nCalled once, before the instance is destroyed. \n只在实例被销毁前调用一次。 \n | \n
\n Dependency injection configuration \n依赖注入的配置 \n | \n\n |
---|---|
{ provide: MyService, useClass: MyMockService } | \nSets or overrides the provider for 把 | \n
{ provide: MyService, useFactory: myFactory } | \nSets or overrides the provider for 把 | \n
{ provide: MyValue, useValue: 41 } | \nSets or overrides the provider for 把 | \n
Binds property value
to the result of expression firstName
.
value
属性绑定到表达式firstName
",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/cheatsheet.md"
},
{
- "original": "\n Dependency injection configuration \n依赖注入的配置 \n | \n\n |
---|---|
{ provide: MyService, useClass: MyMockService } | \nSets or overrides the provider for 把 | \n
{ provide: MyService, useFactory: myFactory } | \nSets or overrides the provider for 把 | \n
{ provide: MyValue, useValue: 41 } | \nSets or overrides the provider for 把 | \n
\n Routing and navigation \n路由与导航 \n | \n
| \n
---|---|
const routes: Routes = [ | \nConfigures routes for the application. Supports static, parameterized, redirect, and wildcard routes. Also supports custom route data and resolve. \n为该应用配置路由。支持静态、参数化、重定向和通配符路由。也支持自定义路由数据和解析(resolve)函数。 \n | \n
| \nMarks the location to load the component of the active route. \n标记出一个位置,用来加载活动路由的组件。 \n | \n
| \nCreates 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 使用路由体系创建一个到其它视图的链接。路由体系由路由路径、必要参数、可选参数、查询参数和文档片段组成。要导航到根路由,请使用 | \n
<a [routerLink]=\"[ '/path' ]\" routerLinkActive=\"active\"> | \nThe provided classes are added to the element when the 当 | \n
class CanActivateGuard implements CanActivate { | \nAn 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. \n用来定义类的接口。路由器会首先调用本接口来决定是否激活该路由。应该返回一个 | \n
class CanDeactivateGuard implements CanDeactivate<T> { | \nAn 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. \n用来定义类的接口。路由器会在导航离开前首先调用本接口以决定是否取消激活本路由。应该返回一个 | \n
class CanActivateChildGuard implements CanActivateChild { | \nAn 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. \n用来定义类的接口。路由器会首先调用本接口来决定是否激活一个子路由。应该返回一个 | \n
class ResolveGuard implements Resolve<T> { | \nAn 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. \n用来定义类的接口。路由器会在渲染该路由之前,首先调用它来解析路由数据。应该返回一个值或能解析成值的 | \n
class CanLoadGuard implements CanLoad { | \nAn 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. \n用来定义类的接口。路由器会首先调用它来决定是否应该加载一个惰性加载模块。应该返回一个 | \n
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"
},
{
@@ -4225,7 +4420,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/component-interaction.md"
},
{
- "original": "\n Future proofing: No need to remember @Injectable()
when you add a dependency later.\n
\n 面向未来: 没有必要记得在后来添加依赖的时候添加 @Injectable()
。\n
\n 面向未来: 没有必要记得在后来添加依赖的时候添加 @Injectable()
。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md"
},
{
- "original": "
\n Consistency: All services follow the same rules, and you don't have to wonder why a decorator is missing.\n
", - "translation": "\n 一致性:所有的服务都遵循同样的规则,不需要考虑为什么某个地方少了一个。\n
", + "original": "", + "translation": "\n 一致性:所有的服务都遵循同样的规则,不需要考虑为什么某个地方少了一个。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md"
},
{
@@ -6710,8 +6875,8 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md"
},
{
- "original": "
\n What if the dependency value isn't a class? Sometimes the thing you want to inject is a\n string, function, or object.\n
", - "translation": "\n 如果依赖值不是一个类呢?有时候想要注入的东西是一个字符串,函数或者对象。\n
", + "original": "", + "translation": "\n 如果依赖值不是一个类呢?有时候想要注入的东西是一个字符串,函数或者对象。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md" }, { - "original": "
\n 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:\n
", - "translation": "\n 应用程序经常为很多很小的因素定义配置对象(例如应用程序的标题或网络API终点的地址)。\n 但是这些配置对象不总是类的实例,它们可能是对象,如下面这个:\n
", + "original": "", + "translation": "\n 应用程序经常为很多很小的因素定义配置对象(例如应用程序的标题或网络API终点的地址)。\n 但是这些配置对象不总是类的实例,它们可能是对象,如下面这个:",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md"
},
{
@@ -7104,11 +7269,6 @@
"translation": "当使用`@Optional()`时,代码必须准备好如何处理空值。\n如果其它的代码没有注册一个 `logger`,注入器会设置该`logger`的值为空 null。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md"
},
- {
- "original": "当使用`@Optional()`时,代码必须准备好如何处理空值。\n如果其它的代码没有注册一个 `logger`,注入器会设置该`logger`的值为空 null。",
- "translation": "## Summary\n## 总结",
- "sourceFile": "/Users/twer/private/GDE/content-1/guide/dependency-injection.md"
- },
{
"original": "You learned the basics of Angular dependency injection in this page.\nYou can register various kinds of providers,\nand you know how to ask for an injected object (such as a service) by\nadding a parameter to a constructor.",
"translation": "本章,我们学习了 Angular 依赖注入的基础知识。\n我们可以注册很多种类的提供商,知道如何通过添加构造函数的参数来请求一个注入对象(例如一个服务)。",
@@ -7510,7 +7670,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/deployment.md"
},
{
- "original": "Consider configuring _Webpack_ with the official\n\nAngular 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.",
+ "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编译。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/deployment.md"
},
@@ -7530,7 +7690,7 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/deployment.md"
},
{
- "original": "Tree shaking was popularized by\nRollup, a popular tool with an ecosystem of\nplugins for bundling, minification, and uglification.\nLearn more about tree shaking and dead code elmination in\n\nthis post by rollup-creator, Rich Harris.",
+ "original": "this post by rollup-creator, Rich Harris.",
"translation": "常用的摇树优化工具是Rollup,一个带有查件的生态系统,可以完成打包、最小化和混淆。\n要了解关于摇树优化和消除死代码技术的更多知识,参见这个帖子,它的作者就是rollup之父Rich Harris。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/deployment.md"
},
@@ -7565,8 +7725,8 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/deployment.md"
},
{
- "original": "The\n\nChrome DevTools Network Performance page is a good place to start learning about measuring performance.",
- "translation": "\n Chrome开发工具的网络性能页是开始学习度量性能的好地方。",
+ "original": "",
+ "translation": "Chrome开发工具的网络性能页是开始学习度量性能的好地方。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/deployment.md"
},
{
@@ -7625,8 +7785,8 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/deployment.md"
},
{
- "original": "Angular应用默认运行在开发模式下,正如在浏览器控制台中看到的如下信息:",
- "translation": "
\n State\n
", - "translation": "\n 状态\n
", + "original": "", + "translation": "\n 状态", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "
\n Class if true\n
", - "translation": "\n 为真时的 CSS 类\n
", + "original": "", + "translation": "\n 为真时的 CSS 类", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "
\n Class if false\n
", - "translation": "\n 为假时的 CSS 类\n
", + "original": "", + "translation": "\n 为假时的 CSS 类", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "
\n The control has been visited.\n
", - "translation": "\n 控件被访问过。\n
", + "original": "", + "translation": "\n 控件被访问过。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "
\n The control's value has changed.\n
", - "translation": "\n 控件的值变化了。\n
", + "original": "", + "translation": "\n 控件的值变化了。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { - "original": "
\n The control's value is valid.\n
", - "translation": "\n 控件的值有效。\n
", + "original": "", + "translation": "\n 控件的值有效。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, { @@ -9454,11 +9594,6 @@ "translation": "动作和它对应的效果如下:", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, - { - "original": "动作和它对应的效果如下:", - "translation": "", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" - }, { "original": "You should see the following transitions and class names:", "translation": "我们会看到下列转换及其类名:", @@ -9484,11 +9619,6 @@ "translation": "可以在输入框的左侧添加带颜色的竖条,用于标记必填字段和无效输入:", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, - { - "original": "可以在输入框的左侧添加带颜色的竖条,用于标记必填字段和无效输入:", - "translation": "", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" - }, { "original": "You achieve this effect by adding these class definitions to a new `forms.css` file\nthat you add to the project as a sibling to `index.html`:", "translation": "在新建的`forms.css`文件中,添加两个样式来实现这一效果。把这个文件添加到项目中,与`index.html`相邻。", @@ -9514,11 +9644,6 @@ "translation": "当用户删除姓名时,应该是这样的:", "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" }, - { - "original": "当用户删除姓名时,应该是这样的:", - "translation": "", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/forms.md" - }, { "original": "To achieve this effect, extend the `` tag with the following:", "translation": "要达到这个效果,在``标签中添加:", @@ -10371,11 +10496,11 @@ }, { "original": "* [NgModules](guide/glossary#ngmodule).\nFor details and examples, see the [NgModules](guide/ngmodule) page.", - "translation": "[Angular 模块](guide/glossary#ngmodule),见[Angular 模块](guide/ngmodule)。\n* ES2015 modules, as described in this section.", + "translation": "[Angular 模块](guide/glossary#ngmodule),见[Angular 模块](guide/ngmodule)。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/glossary.md" }, { - "original": "[Angular 模块](guide/glossary#ngmodule),见[Angular 模块](guide/ngmodule)。\n* ES2015 modules, as described in this section.", + "original": "* ES2015 modules, as described in this section.", "translation": "本节描述的 ES2015 模块。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/glossary.md" }, @@ -11560,7 +11685,7 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/http.md" }, { - "original": "
Hook\n
", - "translation": "\n 钩子\n
", + "original": "", + "translation": "\n 钩子", "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" }, { - "original": "
Purpose and Timing\n
", - "translation": "\n 目的和时机\n
ngOnChanges()
\n \n 目的和时机", "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" }, { @@ -12980,13 +13095,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" }, { - "original": "
Component\n
", - "translation": "\n 组件\n
", + "original": "", + "translation": "\n 组件", "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" }, { - "original": "
Description\n
", - "translation": "\n 描述\n
\n 描述", "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" }, { @@ -13025,8 +13140,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" }, { - "original": "
\n Counter\n
", - "translation": "\n 计数器\n
", + "original": "", + "translation": "\n 计数器", "sourceFile": "/Users/twer/private/GDE/content-1/guide/lifecycle-hooks.md" }, { @@ -13985,8 +14100,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Feature Module\n
", - "translation": "\n 特性模块\n
", + "original": "", + "translation": "\n 特性模块", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Guidelines\n
", - "translation": "\n 指导原则\n
", + "original": "", + "translation": "\n 指导原则", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Domain\n
", - "translation": "\n 领域\n
", + "original": "", + "translation": "\n 领域", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14460,8 +14575,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Routed\n
", - "translation": "\n 路由特性模块\n
", + "original": "", + "translation": "\n 路由特性模块", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14505,8 +14620,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Routing\n
", - "translation": "\n 路由模块\n
", + "original": "", + "translation": "\n 路由模块", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14580,8 +14695,8 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Service\n
", - "translation": "\n 服务\n
", + "original": "", + "translation": "\n 服务", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14601,12 +14716,12 @@ }, { "original": "Do *not* import service modules in other feature modules.\n If you deviate from this guideline, know what you're doing and why.", - "translation": "*不要*在任何特性模块中导入它们。\n 如果你要违背这条指导原则,请务必想清楚你在做什么,并要有充分的理由。\n
\n Widget\n
", - "translation": "\n 窗口部件\n
", + "original": "", + "translation": "\n 窗口部件", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14645,173 +14760,153 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Feature Module\n
", - "translation": "\n 特性模块\n
", + "original": "", + "translation": "\n 特性模块", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Declarations\n
", - "translation": "\n 声明`declarations`\n
", + "original": "", + "translation": "\n 声明`declarations`", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Providers\n
", - "translation": "\n 提供商`providers`\n
", + "original": "", + "translation": "\n 提供商`providers`", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Exports\n
", - "translation": "\n 导出什么\n
", + "original": "", + "translation": "\n 导出什么", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Imported By\n
", - "translation": "\n 被谁导入\n
", + "original": "", + "translation": "\n 被谁导入", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Examples\n
", - "translation": "\n 范例\n
", + "original": "", + "translation": "\n 范例", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Domain\n
", - "translation": "\n 领域\n
", + "original": "", + "translation": "\n 领域", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Yes\n
", - "translation": "\n 有\n
", + "original": "", + "translation": "\n 有", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Rare\n
", - "translation": "\n 罕见\n
", + "original": "", + "translation": "\n 罕见", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Top component\n
", - "translation": "\n 顶级组件\n
", + "original": "", + "translation": "\n 顶级组件", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Feature, AppModule
\n
\n 特性模块和AppModule
\n
\n 特性模块和AppModule
",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md"
},
{
- "original": "
\n ContactModule
(before routing)\n
\n ContactModule
(路由之前的那个例子)\n
\n ContactModule
(路由之前的那个例子)",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md"
},
{
- "original": "
\n Routed\n
", - "translation": "\n 路由\n
", + "original": "", + "translation": "\n 路由", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Yes\n
", - "translation": "\n 有\n
", + "original": "", + "translation": "\n 有", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Rare\n
", - "translation": "\n 罕见\n
", + "original": "", + "translation": "\n 罕见", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n No\n
", - "translation": "\n 无\n
", + "original": "", + "translation": "\n 无", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Nobody\n
", - "translation": "\n 无\n
", + "original": "", + "translation": "\n 无", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n ContactModule
, HeroModule
, CrisisModule
\n
\n ContactModule
、HeroModule
、CrisisModule
\n
\n 路由", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Routing\n
", - "translation": "\n 路由\n
", + "original": "", + "translation": "\n 无", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n No\n
", - "translation": "\n 无\n
", + "original": "", + "translation": "\n 有", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Yes\n
", - "translation": "\n 有\n
", + "original": "", + "translation": "\n 无", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n No\n
", - "translation": "\n 无\n
", + "original": "", + "translation": "\n 服务", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n HttpModule
, CoreModule
\n
\n HttpModule
、CoreModule
\n
\n 无", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Service\n
", - "translation": "\n 服务\n
", + "original": "", + "translation": "\n 有", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n No\n
", - "translation": "\n 无\n
", + "original": "", + "translation": "\n 无", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Yes\n
", - "translation": "\n 有\n
", + "original": "", + "translation": "\n 窗口部件", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n No\n
", - "translation": "\n 无\n
", + "original": "", + "translation": "\n 有", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n HttpModule
, CoreModule
\n
\n HttpModule
、CoreModule
\n
\n 罕见", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Widget\n
", - "translation": "\n 窗口部件\n
", + "original": "", + "translation": "\n 有", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Yes\n
", - "translation": "\n 有\n
", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" - }, - { - "original": "\n Rare\n
", - "translation": "\n 罕见\n
", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" - }, - { - "original": "\n Yes\n
", - "translation": "\n 有\n
", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" - }, - { - "original": "\n Feature\n
", - "translation": "\n 特性模块\n
", - "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" - }, - { - "original": "\n CommonModule
, SharedModule
\n
\n CommonModule
、SharedModule
\n
\n 特性模块", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -14875,7 +14970,7 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "The NgModule is also special in another way.\nUnlike JavaScript modules, an NgModule can extend the _entire_ application with services\nby adding providers to the `@NgModule.providers` list.\n", + "original": "", "translation": "Angular模块还有些别的特殊之处。\n不同于JavaScript模块,Angular模块可以通过把服务提供商添加到`@NgModule.providers`数组中来扩展*整个*应用提供的服务。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, @@ -14965,13 +15060,13 @@ "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Property\n
", - "translation": "\n 属性\n
", + "original": "", + "translation": "\n 属性", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { - "original": "
\n Description\n
", - "translation": "\n 描述\n
", + "original": "", + "translation": "\n 描述", "sourceFile": "/Users/twer/private/GDE/content-1/guide/ngmodule-faq.md" }, { @@ -15146,7 +15241,7 @@ }, { "original": "Both are advanced techniques that few developers ever employ.\n If you are one of those few, you must add these components to the\n `entryComponents` list yourself, either programmatically or by hand.", - "translation": "所有这些高级技巧是只有极少数开发人员才会去用的。\n 如果你是其中的一位,那么你就不得不自行把这些组件添加到`entryComponents`列表中 —— 无论是用程序添加还是手动添加。\n
\n File", + "original": " | \n File", "translation": "文件", "sourceFile": "/Users/twer/private/GDE/content-1/guide/quickstart.md" }, { - "original": " | \n\n Purpose", + "original": " | \n Purpose", "translation": "用途", "sourceFile": "/Users/twer/private/GDE/content-1/guide/quickstart.md" }, @@ -17931,7 +18001,7 @@ }, { "original": "A folder where you can put images and anything else to be copied wholesale\n when you build your application.", - "translation": "这个文件夹下你可以放图片等任何东西,在构建应用时,它们全都会拷贝到发布包中。\n \n | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
", + "translation": "这个文件夹下你可以放图片等任何东西,在构建应用时,它们全都会拷贝到发布包中。", "sourceFile": "/Users/twer/private/GDE/content-1/guide/quickstart.md" }, { @@ -17941,7 +18011,7 @@ }, { "original": "Every site wants to look good on the bookmark bar.\n Get started with your very own Angular icon.", - "translation": "每个网站都希望自己在书签栏中能好看一点。\n 请把它换成你自己的图标。\n | \n|||||||||||
",
+ "translation": "每个网站都希望自己在书签栏中能好看一点。\n 请把它换成你自己的图标。",
"sourceFile": "/Users/twer/private/GDE/content-1/guide/quickstart.md"
},
{
@@ -17985,12 +18055,12 @@
"sourceFile": "/Users/twer/private/GDE/content-1/guide/quickstart.md"
},
{
- "original": "
|