diff --git a/aio/content/guide/feature-modules.md b/aio/content/guide/feature-modules.md index 346035832b..84f42e4c6e 100644 --- a/aio/content/guide/feature-modules.md +++ b/aio/content/guide/feature-modules.md @@ -4,12 +4,18 @@ Feature modules are NgModules for the purpose of organizing code. #### Prerequisites +#### 前提条件 + A basic understanding of the following: +对下列知识有基本的了解: + * [Bootstrapping](guide/bootstrapping). * [JavaScript Modules vs. NgModules](guide/ngmodule-vs-jsmodule). + [JavaScript 模块与 NgModules](guide/ngmodule-vs-jsmodule). + * [Frequently Used Modules](guide/frequent-ngmodules). For the final sample app with a feature module that this page describes, diff --git a/aio/content/guide/frequent-ngmodules.md b/aio/content/guide/frequent-ngmodules.md index c2dcbe92dd..78a6600aa8 100644 --- a/aio/content/guide/frequent-ngmodules.md +++ b/aio/content/guide/frequent-ngmodules.md @@ -2,6 +2,8 @@ #### Prerequisites +#### 前提条件 + A basic understanding of [Bootstrapping](guide/bootstrapping).
A quick look at an Angular "hello world" application.
+快速体验 Angular 的 "hello world" 应用。
+ + + + +Get going on your own environment with the Quickstart.
+跟随"快速上手"构建你的开发环境
+ + + + +Learn Angular application fundamentals, starting with an architecture overview.
+学习 Angular 应用的基本原理。
从架构概览开始。
\n Chrome开发工具的网络性能页是开始学习度量性能的好地方。
", "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/deployment.md" }, { @@ -7279,6 +7319,51 @@ "translation": "[WebPageTest](https://www.webpagetest.org/)工具是另一个不错的选择,它能帮你验证你的部署是否成功了。", "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/deployment.md" }, + { + "original": "### Inspect the bundles", + "translation": "### 深入探查文件包(bundle)", + "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/deployment.md" + }, + { + "original": "The source-map-explorer\ntool is a great way to inspect the generated JavaScript bundles after a production build.", + "translation": "source-map-explorer 是在生产环境构建中深入探查所生成的文件包的好工具。", + "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/deployment.md" + }, + { + "original": "Install `source-map-explorer`:", + "translation": "安装 `source-map-explorer`:", + "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/deployment.md" + }, + { + "original": "Build your app for production _including the source maps_", + "translation": "构建*带源码映射*的生产版本", + "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/deployment.md" + }, + { + "original": "List the generated bundles in the `dist/` folder.", + "translation": "列出 `dist/` 文件夹中生成的文件包。", + "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/deployment.md" + }, + { + "original": "Run the explorer to generate a graphical representation of one of the bundles.\nThe following example displays the graph for the _main_ bundle.", + "translation": "运行这个源码映射浏览器,以生成文件包之一的图形化表示。\n下面的例子中就是 `main` 这个文件包的图形。", + "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/deployment.md" + }, + { + "original": "The `source-map-explorer` analyzes the source map generated with the bundle and draws a map of all dependencies,\nshowing exactly which classes are included in the bundle.", + "translation": "`source-map-explorer` 分析了文件包生成的源码映射信息,并画出了所有这些依赖的地图,准确的展示了这个包中包含了哪些类。", + "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/deployment.md" + }, + { + "original": "Here's the output for the _main_ bundle of the QuickStart.", + "translation": "下面是《快速起步》一章生成的 `main` 文件包的输出。", + "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/deployment.md" + }, + { + "original": "## The `base` tag", + "translation": "## `base` 标签", + "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/deployment.md" + }, { "original": "The HTML [_<base href=\"...\"/>_](/guide/router)\nspecifies a base path for resolving relative URLs to assets such as images, scripts, and style sheets.\nFor example, given the `RouterModule
",
"translation": "RouterModule
(路由器模块)",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/frequent-ngmodules.md"
},
+ {
+ "original": "* [JavaScript Modules vs. NgModules](guide/ngmodule-vs-jsmodule).",
+ "translation": "[JavaScript 模块与 NgModules](guide/ngmodule-vs-jsmodule).",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/frequent-ngmodules.md"
+ },
{
"original": "# Angular Glossary",
"translation": "# Angular 词汇表",
@@ -12486,17 +12641,17 @@
},
{
"original": "## Installing in your project",
- "translation": "## 安装到工程中",
+ "translation": "## 安装到项目中",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/language-service.md"
},
{
"original": "You can also install Angular Language Service in your project with the \nfollowing `npm` command:",
- "translation": "我们还可以使用下列`npm`命令来把 Angular 语言服务安装到工程中:",
+ "translation": "我们还可以使用下列`npm`命令来把 Angular 语言服务安装到项目中:",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/language-service.md"
},
{
"original": "Additionally, add the following to the `\"compilerOptions\"` section of \nyour project's `tsconfig.json`.",
- "translation": "另外,还要在工程的`tsconfig.json`中添加下列`\"compilerOptions\"`区域:",
+ "translation": "另外,还要在项目的`tsconfig.json`中添加下列`\"compilerOptions\"`区域:",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/language-service.md"
},
{
@@ -12511,7 +12666,7 @@
},
{
"original": "When you use an editor with a language service, there's an \neditor process which starts a separate language process/service \nto which it speaks through an [RPC](https://en.wikipedia.org/wiki/Remote_procedure_call). \nAny time you type inside of the editor, it sends information to the other process to \ntrack the state of your project. When you trigger a completion list within a template, the editor process first parses the template into an HTML AST, or [abstract syntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree). Then the Angular compiler interprets \nwhat module the template is part of, the scope you're in, and the component selector. Then it figures out where in the template AST your cursor is. When it determines the \ncontext, it can then determine what the children can be.",
- "translation": "当使用带有语言服务的编辑器时,就会有一个编辑器进程,它会启动一个独立的语言服务进程/服务,它们通过[RPC](https://en.wikipedia.org/wiki/Remote_procedure_call)彼此交谈。\n当我们在编辑器中输入的时候,它把这些信息发送到另一个进程中,以便追踪工程的状态。\n当我们在模板中触发一个自动完成列表时,编辑器进程就会先把这个模板解析成 HTML AST,或者叫[抽象语法树](https://en.wikipedia.org/wiki/Abstract_syntax_tree)。然后,Angular 编译器就会解释模板所属的模块以及模板选择器。然后它找出我们的光标目前正在模板 AST 的什么位置。一旦它确定了情境,就可以决定其子节点可以是什么了。",
+ "translation": "当使用带有语言服务的编辑器时,就会有一个编辑器进程,它会启动一个独立的语言服务进程/服务,它们通过[RPC](https://en.wikipedia.org/wiki/Remote_procedure_call)彼此交谈。\n当我们在编辑器中输入的时候,它把这些信息发送到另一个进程中,以便追踪项目的状态。\n当我们在模板中触发一个自动完成列表时,编辑器进程就会先把这个模板解析成 HTML AST,或者叫[抽象语法树](https://en.wikipedia.org/wiki/Abstract_syntax_tree)。然后,Angular 编译器就会解释模板所属的模块以及模板选择器。然后它找出我们的光标目前正在模板 AST 的什么位置。一旦它确定了情境,就可以决定其子节点可以是什么了。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/language-service.md"
},
{
@@ -12534,6 +12689,21 @@
"translation": "要了解更多信息,参见 [ng-conf](https://www.ng-conf.org/) 2017 中 [Chuck Jazdzewski的演讲](https://www.youtube.com/watch?v=ez3R0Gi4z5A&t=368s) 中讲解的 Angular 语言服务。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/language-service.md"
},
+ {
+ "original": "#### Prerequisites",
+ "translation": "#### 前提条件",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/lazy-loading-ngmodules.md"
+ },
+ {
+ "original": "A basic understanding of the following:",
+ "translation": "对下列知识有基本的了解:",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/lazy-loading-ngmodules.md"
+ },
+ {
+ "original": "* [JavaScript Modules vs. NgModules](guide/ngmodule-vs-jsmodule).",
+ "translation": "[JavaScript 模块与 NgModules](guide/ngmodule-vs-jsmodule).",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/lazy-loading-ngmodules.md"
+ },
{
"original": "# Lifecycle Hooks",
"translation": "# 生命周期钩子",
@@ -13199,11 +13369,21 @@
"translation": "回忆一下,Angular在每次调用*AfterView*钩子之前也会同时调用*AfterContent*。\nAngular在完成当前组件的视图合成之前,就已经完成了被投影内容的合成。\n所以我们仍然有机会去修改那个视图。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/lifecycle-hooks.md"
},
+ {
+ "original": "#### Prerequisites",
+ "translation": "#### 前提条件",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/module-types.md"
+ },
{
"original": "A basic understanding of the following concepts:",
"translation": "对下列概念有基本的理解:",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/module-types.md"
},
+ {
+ "original": "* [JavaScript Modules vs. NgModules](guide/ngmodule-vs-jsmodule).",
+ "translation": "[JavaScript 模块与 NgModules](guide/ngmodule-vs-jsmodule).",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/module-types.md"
+ },
{
"original": "Feature Module",
"translation": "特性模块",
@@ -13374,11 +13554,21 @@
"translation": "特性",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/module-types.md"
},
+ {
+ "original": "#### Prerequisites",
+ "translation": "#### 前提条件",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/ngmodule-api.md"
+ },
{
"original": "A basic understanding of the following concepts:",
"translation": "对下列概念有基本的理解:",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/ngmodule-api.md"
},
+ {
+ "original": "* [JavaScript Modules vs. NgModules](guide/ngmodule-vs-jsmodule).",
+ "translation": "[JavaScript 模块与 NgModules](guide/ngmodule-vs-jsmodule).",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/ngmodule-api.md"
+ },
{
"original": "The following table summarizes the `@NgModule` metadata properties.",
"translation": "下面是`@NgModule`元数据中属性的汇总表:",
@@ -14344,6 +14534,11 @@
"translation": "`@NgModule`元数据告诉*Angular编译器*要为当前模块编译哪些组件,以及如何把当前模块和其它模块链接起来。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/ngmodule-faq.md"
},
+ {
+ "original": "#### Prerequisites",
+ "translation": "#### 前提条件",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/ngmodule-vs-jsmodule.md"
+ },
{
"original": "* An NgModule bounds [declarable classes](guide/ngmodule-faq#q-declarable) only.\nDeclarables are the only classes that matter to the [Angular compiler](guide/ngmodule-faq#q-angular-compiler).",
"translation": "Angular模块只绑定了[_可声明的类_](guide/ngmodule-faq#q-declarable),这些可声明的类只是供[Angular编译器](guide/ngmodule-faq#q-angular-compiler)用的。",
@@ -14359,11 +14554,21 @@
"translation": "# Angular模块 (NgModule)",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/ngmodules.md"
},
+ {
+ "original": "#### Prerequisites",
+ "translation": "#### 前提条件",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/ngmodules.md"
+ },
{
"original": "A basic understanding of the following concepts:",
"translation": "对下列概念有基本的理解:",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/ngmodules.md"
},
+ {
+ "original": "* [JavaScript Modules vs. NgModules](guide/ngmodule-vs-jsmodule).",
+ "translation": "[JavaScript 模块与 NgModules](guide/ngmodule-vs-jsmodule).",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/ngmodules.md"
+ },
{
"original": "## Angular modularity",
"translation": "## Angular 模块化",
@@ -21139,6 +21344,46 @@
"translation": "Angular应用应该遵循和常规Web应用一样的安全原则并按照这些原则进行审计。Angular中某些应该在安全评审中被审计的API(\n比如[_bypassSecurityTrust_](guide/security#bypass-security-apis) API)都在文档中被明确标记为安全性敏感的。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/security.md"
},
+ {
+ "original": "#### Prerequisites",
+ "translation": "#### 前提条件",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/service-worker-communications.md"
+ },
+ {
+ "original": "A basic understanding of the following:",
+ "translation": "对下列知识有基本的了解:",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/service-worker-communications.md"
+ },
+ {
+ "original": "#### Prerequisites",
+ "translation": "#### 前提条件",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/service-worker-config.md"
+ },
+ {
+ "original": "A basic understanding of the following:",
+ "translation": "对下列知识有基本的了解:",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/service-worker-config.md"
+ },
+ {
+ "original": "#### Prerequisites",
+ "translation": "#### 前提条件",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/service-worker-devops.md"
+ },
+ {
+ "original": "A basic understanding of the following:",
+ "translation": "对下列知识有基本的了解:",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/service-worker-devops.md"
+ },
+ {
+ "original": "#### Prerequisites",
+ "translation": "#### 前提条件",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/service-worker-getting-started.md"
+ },
+ {
+ "original": "A basic understanding of the following:",
+ "translation": "对下列知识有基本的了解:",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/service-worker-getting-started.md"
+ },
{
"original": "# Set the Document Title",
"translation": "# 设置文档标题",
@@ -21629,6 +21874,21 @@
"translation": "在 Windows 中,默认情况下一个应用只能有六个 WebSocket 连接,参见 MSDN 中的 WebSocket 设置部分。\n所以,如果 IE 手动刷新或被 `ng serve` 触发了自动刷新,有时候 WebSocket 可能无法正常关闭,当 WebSocket 的连接数超限时,就会抛出 `SecurityError` 异常。请放心,这个异常对 Angular 应用没什么影响,你重启一下 IE 就能消除这个错误,或者修改 Windows 注册表来修改这个上限。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/setup.md"
},
+ {
+ "original": "#### Prerequisites",
+ "translation": "#### 前提条件",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/sharing-ngmodules.md"
+ },
+ {
+ "original": "A basic understanding of the following:",
+ "translation": "对下列知识有基本的了解:",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/sharing-ngmodules.md"
+ },
+ {
+ "original": "* [JavaScript Modules vs. NgModules](guide/ngmodule-vs-jsmodule).",
+ "translation": "[JavaScript 模块与 NgModules](guide/ngmodule-vs-jsmodule).",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/sharing-ngmodules.md"
+ },
{
"original": "Note the following:",
"translation": "请注意以下几点:",
@@ -22694,6 +22954,11 @@
"translation": "文件名",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
},
+ {
+ "original": "Back to top",
+ "translation": "回到顶部",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
+ },
{
"original": "### Service names",
"translation": "### 服务名",
@@ -22889,6 +23154,11 @@
"translation": "**为何?**指令更加容易被识别。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
},
+ {
+ "original": "Back to top",
+ "translation": "回到顶部",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
+ },
{
"original": "### Pipe names",
"translation": "### 管道名",
@@ -23284,6 +23554,11 @@
"translation": "**为何?** TypeScript 工具让识别私有或公有属性和方法变得很简单。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
},
+ {
+ "original": "Back to top",
+ "translation": "回到顶部",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
+ },
{
"original": "### Import line spacing",
"translation": "### 导入语句中的空行",
@@ -23344,6 +23619,11 @@
"translation": "所有内容都遵循每个文件一个特性的原则。每个组件、服务和管道都在自己的文件里。\n所有第三方程序包保存到其它目录里,而不是`src`目录。\n你不会修改它们,所以不希望它们弄乱我们的应用程序。\n使用本指南介绍的文件命名约定。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
},
+ {
+ "original": "Back to top",
+ "translation": "回到顶部",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
+ },
{
"original": "#### Style 04-01",
"translation": "#### 风格 04-01",
@@ -23389,6 +23669,11 @@
"translation": "**为何?**\n要想高效的工作,就必须能迅速找到文件,特别是当不知道(或不记得)文件*名*时。\n把相关的文件一起放在一个直观的位置可以节省时间。\n富有描述性的目录结构会让你和后面的维护者眼前一亮。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
},
+ {
+ "original": "Back to top",
+ "translation": "回到顶部",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
+ },
{
"original": "### Identify",
"translation": "### 识别",
@@ -23469,6 +23754,11 @@
"translation": "还是根据你自己的舒适度而定吧。\n除非创建新文件夹能有显著的价值,否则尽量使用扁平结构。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
},
+ {
+ "original": "Back to top",
+ "translation": "回到顶部",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
+ },
{
"original": "### _T-DRY_ (Try to be _DRY_)",
"translation": "### *T-DRY*(尽量不重复自己)",
@@ -24164,6 +24454,11 @@
"translation": "**为何?**如果指令名也同时用作*输入*属性,而且指令名无法准确描述这个属性的用途时,应该使用别名。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
},
+ {
+ "original": "Back to top",
+ "translation": "回到顶部",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
+ },
{
"original": "### Member sequence",
"translation": "### 成员顺序",
@@ -24269,6 +24564,11 @@
"translation": "**为何?**Angular 允许[另一种备选语法](guide/template-syntax#binding-syntax) `on-*`。如果事件的名字本身带有前缀`on`,那么绑定的表达式可能是`on-onEvent`。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
},
+ {
+ "original": "Back to top",
+ "translation": "回到顶部",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
+ },
{
"original": "### Put presentation logic in the component class",
"translation": "### 把表现层逻辑放到组件类里",
@@ -24329,6 +24629,11 @@
"translation": "**为何?**一个元素可以使用多个属性型指令。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
},
+ {
+ "original": "Back to top",
+ "translation": "回到顶部",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/styleguide.md"
+ },
{
"original": "### _HostListener_/_HostBinding_ decorators versus _host_ metadata",
"translation": "### *HostListener* 和 *HostBinding* 装饰器 vs. 组件元数据 *host*",
@@ -26004,11 +26309,6 @@
"translation": "[`NgModel`](guide/template-syntax#ngModel) - 双向绑定到HTML表单元素",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/template-syntax.md"
},
- {
- "original": "### NgClass",
- "translation": "### NgClass 指令",
- "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/template-syntax.md"
- },
{
"original": "You typically control how elements appear\nby adding and removing CSS classes dynamically.\nYou can bind to the `ngClass` to add or remove several classes simultaneously.",
"translation": "我们经常用动态添加或删除 CSS 类的方式来控制元素如何显示。\n通过绑定到`NgClass`,可以同时添加或移除多个类。",
@@ -26044,11 +26344,6 @@
"translation": "你既可以在初始化时调用`setCurrentClassess()`,也可以在所依赖的属性变化时调用。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/template-syntax.md"
},
- {
- "original": "### NgStyle",
- "translation": "### NgStyle 指令",
- "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/template-syntax.md"
- },
{
"original": "You can set inline styles dynamically, based on the state of the component.\nWith `NgStyle` you can set many inline styles simultaneously.",
"translation": "我们可以根据组件的状态动态设置内联样式。\n`NgStyle`绑定可以同时设置多个内联样式。",
@@ -26239,11 +26534,6 @@
"translation": "[NgForOf](guide/template-syntax#ngFor) - 对列表中的每个条目重复套用同一个模板",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/template-syntax.md"
},
- {
- "original": "### NgIf",
- "translation": "### NgIf 指令",
- "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/template-syntax.md"
- },
{
"original": "You can add or remove an element from the DOM by applying an `NgIf` directive to\nthat element (called the _host element_).\nBind the directive to a condition expression like `isActive` in this example.",
"translation": "通过把`NgIf`指令应用到元素上(称为*宿主元素*),我们可以往DOM中添加或从DOM中移除这个元素。\n在下面的例子中,该指令绑定到了类似于`isActive`这样的条件表达式。",
@@ -26309,11 +26599,6 @@
"translation": "参见稍后的[_安全导航操作符_](guide/template-syntax#safe-navigation-operator \"Safe naviation operator (?.)\")部分。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/template-syntax.md"
},
- {
- "original": "### NgForOf",
- "translation": "### NgFor 指令",
- "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/template-syntax.md"
- },
{
"original": "`NgForOf` is a _repeater_ directive — a way to present a list of items.\nYou define a block of HTML that defines how a single item should be displayed.\nYou tell Angular to use that block as a template for rendering each item in the list.",
"translation": "`NgFor`是一个_重复器_指令 —— 自定义数据显示的一种方式。\n我们的目标是展示一个由多个条目组成的列表。首先定义了一个 HTML 块,它规定了单个条目应该如何显示。\n再告诉 Angular 把这个块当做模板,渲染列表中的每个条目。",
@@ -30589,6 +30874,16 @@
"translation": "“快速上手”本身不需要这些类型定义,但是文档中的很多例子都需要。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/typescript-configuration.md"
},
+ {
+ "original": "### *target*",
+ "translation": "### *编译目标(target)*",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/typescript-configuration.md"
+ },
+ {
+ "original": "By default, the target is `es5`, you can configure the target to `es6` if you only want to deploy the application to\nes6 compatible browser. But if you configure the target to `es6` in some old browser such as `IE`, `Syntax Error` will be thrown.",
+ "translation": "默认情况下,编译目标是 `es5`,如果你只想发布到兼容 es6 的浏览器中,也可以把它配置为 `es6`。\n不过,如果配置为 `es6`,那么一些老的浏览器(如 `IE` )中就会抛出 `Syntax Error` 错误。",
+ "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/guide/typescript-configuration.md"
+ },
{
"original": "## Preparation",
"translation": "## 准备工作",
@@ -35901,7 +36196,7 @@
},
{
"original": "#### Try it",
- "translation": "#### 试试",
+ "translation": "#### 试试看",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/tutorial/toh-pt5.md"
},
{
@@ -36351,7 +36646,7 @@
},
{
"original": "#### Try it",
- "translation": "#### 试试",
+ "translation": "#### 试试看",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/tutorial/toh-pt5.md"
},
{
@@ -36459,11 +36754,6 @@
"translation": "在多个组件之间共享了`HeroService`服务。",
"sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/tutorial/toh-pt5.md"
},
- {
- "original": "# HTTP",
- "translation": "# HTTP 服务",
- "sourceFile": "/Users/twer/private/GDE/angular-cn/aio/content/tutorial/toh-pt6.md"
- },
{
"original": "In this tutorial, you'll add the following data persistence features with help from\nAngular's `HttpClient`.",
"translation": "在这节课中,你将借助 Angular 的 `HttpClient` 来添加一些数据持久化特性。",