From ecb9c70397c9e0218fe0f6430f30bfe64e3e8344 Mon Sep 17 00:00:00 2001 From: zhusir Date: Fri, 22 May 2020 15:22:34 +0800 Subject: [PATCH 1/7] =?UTF-8?q?docs:=20=E7=BF=BB=E8=AF=91=E6=94=B9?= =?UTF-8?q?=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aio/content/guide/http.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/http.md b/aio/content/guide/http.md index 6b8772d50b..0cc4394549 100644 --- a/aio/content/guide/http.md +++ b/aio/content/guide/http.md @@ -654,7 +654,7 @@ Execution of the HTTP request is _deferred_, allowing you to extend the observable with additional operations such as `tap` and `catchError` before anything actually happens. `HttpClient` 的所有方法返回的可观察对象都设计为*冷的*。 -HTTP 请求的执行都是*延期执行的*,让你可以用 `tap` 和 `catchError` 这样的操作符来在实际执行什么之前,先对这个可观察对象进行扩展。 +HTTP 请求的执行都是*延期执行的*,让你可以用 `tap` 和 `catchError` 这样的操作符来在实际执行HTTP请求之前,先对这个可观察对象进行扩展。 Calling `subscribe(...)` triggers execution of the observable and causes `HttpClient` to compose and send the HTTP request to the server. From daeb0451740565bbe714b83a4cbd970825de8b30 Mon Sep 17 00:00:00 2001 From: Joe Jiang Date: Tue, 19 May 2020 09:54:35 +0800 Subject: [PATCH 2/7] =?UTF-8?q?fix=EF=BC=9A=20=E6=9B=B4=E6=96=B0=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E7=BC=96=E8=AF=91=E5=99=A8=E4=B8=80=E8=8A=82=E4=BB=A5?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=AE=98=E6=96=B9=E6=9C=80=E6=96=B0=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue https://github.com/angular/angular-cli/issues/17736#issuecomment-629995982 --- aio/content/guide/aot-compiler.md | 34 ++++++------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/aio/content/guide/aot-compiler.md b/aio/content/guide/aot-compiler.md index ee4f5ed15c..12e12a7761 100644 --- a/aio/content/guide/aot-compiler.md +++ b/aio/content/guide/aot-compiler.md @@ -81,39 +81,17 @@ Angular offers two ways to compile your application: Angular 提供了两种方式来编译你的应用: -* **_Just-in-Time_ (JIT)**, which compiles your app in the browser at runtime. +* **_Just-in-Time_ (JIT)**, which compiles your app in the browser at runtime. This was the default until Angular 8. - ***即时编译* (JIT)**,它会在运行期间在浏览器中编译你的应用。 + ***即时编译* (JIT)**,它会在运行期间在浏览器中编译你的应用。Angular 8 及先前版本以此为默认选项。 -* **_Ahead-of-Time_ (AOT)**, which compiles your app at build time. +* **_Ahead-of-Time_ (AOT)**, which compiles your app and libraries at build time. This is the default since Angular 9. - **预先(AOT)编译**,它会在构建时编译你的应用。 + ***预先编译* (AOT)***,它会在构建时编译你的应用或库。从 Angular 9 开始这是默认选项。 -JIT compilation is the default when you run the [`ng build`](cli/build) (build only) or [`ng serve`](cli/serve) (build and serve locally) CLI commands: +When you run the [`ng build`](cli/build) (build only) or [`ng serve`](cli/serve) (build and serve locally) CLI commands, the type of compilation (JIT or AOT) depends on the value of the `aot` property in your build configuration specified in `angular.json`. By default, `aot` is set to `true` for new CLI apps. -当你运行 [`ng build`](cli/build)(仅编译)或 [`ng serve`](cli/serve)(编译并启动本地服务器) 这两个 CLI 命令时 JIT 编译是默认选项: - - - ng build - ng serve - - -{@a compile} - -For AOT compilation, include the `--aot` option with the `ng build` or `ng serve` command: - -要进行 AOT 编译,只要让 `ng build` 或 `ng serve` 命令中包含 `--aot` 标志就行了: - - - ng build --aot - ng serve --aot - - -
- -The `ng build` command with the `--prod` meta-flag (`ng build --prod`) compiles with AOT by default. - -带有 `--prod` 标志的 `ng build` 命令 (`ng build --prod`) 会默认使用 AOT 编译。 +当你运行 [`ng build`](cli/build)(仅编译)或 [`ng serve`](cli/serve)(编译并启动本地服务器) 这两个 CLI 命令时,编译方式(JIT 或者 AOT)取决于你在 `angular.json` 中编译选项中 `aot` 属性的取值。默认情况下,在 CLI 新起的项目中 `aot` 被设置为 `true`。 See the [CLI command reference](cli) and [Building and serving Angular apps](guide/build) for more information. From d34b87ad7846c86496ce0f4be8081f1fed2c68f4 Mon Sep 17 00:00:00 2001 From: chenc Date: Tue, 26 May 2020 13:38:22 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=96=87=E6=A1=88=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 自举启动 -> 自己启动 --- aio/content/guide/elements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/elements.md b/aio/content/guide/elements.md index 33da63cecf..cf1c850ab3 100644 --- a/aio/content/guide/elements.md +++ b/aio/content/guide/elements.md @@ -42,7 +42,7 @@ Creating a custom element is simple and straightforward, and automatically conne Custom elements bootstrap themselves - they start automatically when they are added to the DOM, and are automatically destroyed when removed from the DOM. Once a custom element is added to the DOM for any page, it looks and behaves like any other HTML element, and does not require any special knowledge of Angular terms or usage conventions. -自定义元素会自举启动 —— 它们在添加到 DOM 中时就会自行启动自己,并在从 DOM 中移除时自行销毁自己。一旦自定义元素添加到了任何页面的 DOM 中,它的外观和行为就和其它的 HTML 元素一样了,不需要对 Angular 的术语或使用约定有任何特殊的了解。 +自定义元素会自己启动 —— 它们在添加到 DOM 中时就会自行启动自己,并在从 DOM 中移除时自行销毁自己。一旦自定义元素添加到了任何页面的 DOM 中,它的外观和行为就和其它的 HTML 元素一样了,不需要对 Angular 的术语或使用约定有任何特殊的了解。 - Easy dynamic content in an Angular app From ebbf29788d77125eb533140db39e91fe59e1c997 Mon Sep 17 00:00:00 2001 From: chenc Date: Wed, 27 May 2020 10:29:41 +0800 Subject: [PATCH 4/7] =?UTF-8?q?docs:=20=E5=90=8D=E8=AF=8D=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 自举启动 -> 自举 --- aio/content/guide/elements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/elements.md b/aio/content/guide/elements.md index cf1c850ab3..45144e05a5 100644 --- a/aio/content/guide/elements.md +++ b/aio/content/guide/elements.md @@ -42,7 +42,7 @@ Creating a custom element is simple and straightforward, and automatically conne Custom elements bootstrap themselves - they start automatically when they are added to the DOM, and are automatically destroyed when removed from the DOM. Once a custom element is added to the DOM for any page, it looks and behaves like any other HTML element, and does not require any special knowledge of Angular terms or usage conventions. -自定义元素会自己启动 —— 它们在添加到 DOM 中时就会自行启动自己,并在从 DOM 中移除时自行销毁自己。一旦自定义元素添加到了任何页面的 DOM 中,它的外观和行为就和其它的 HTML 元素一样了,不需要对 Angular 的术语或使用约定有任何特殊的了解。 +自定义元素会自举 —— 它们在添加到 DOM 中时就会自行启动自己,并在从 DOM 中移除时自行销毁自己。一旦自定义元素添加到了任何页面的 DOM 中,它的外观和行为就和其它的 HTML 元素一样了,不需要对 Angular 的术语或使用约定有任何特殊的了解。 - Easy dynamic content in an Angular app From b4c3102a3f31cbb8f167fdd9fc818da2f71d9a58 Mon Sep 17 00:00:00 2001 From: zhusir Date: Fri, 29 May 2020 00:17:01 +0800 Subject: [PATCH 5/7] =?UTF-8?q?docs:=20=E7=BF=BB=E8=AF=91=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aio/content/guide/hierarchical-dependency-injection.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aio/content/guide/hierarchical-dependency-injection.md b/aio/content/guide/hierarchical-dependency-injection.md index 4614bc5ce5..1701056778 100644 --- a/aio/content/guide/hierarchical-dependency-injection.md +++ b/aio/content/guide/hierarchical-dependency-injection.md @@ -311,7 +311,7 @@ resolves it in two phases: 针对 `ElementInjector` 层次结构(其父级) -1. Against the `ModuleInjector` hierarchy (its parents) +2. Against the `ModuleInjector` hierarchy (its parents) 针对 `ModuleInjector` 层次结构(其父级) From c38b08ff5b1cdc8e35cbb18dbbad878f8c5e028a Mon Sep 17 00:00:00 2001 From: zhusir Date: Sun, 31 May 2020 00:38:31 +0800 Subject: [PATCH 6/7] =?UTF-8?q?docs:=20=E7=BF=BB=E8=AF=91=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aio/content/guide/hierarchical-dependency-injection.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/aio/content/guide/hierarchical-dependency-injection.md b/aio/content/guide/hierarchical-dependency-injection.md index 1701056778..57959de752 100644 --- a/aio/content/guide/hierarchical-dependency-injection.md +++ b/aio/content/guide/hierarchical-dependency-injection.md @@ -25,7 +25,6 @@ in this hierarchy using an `@NgModule()` or `@Injectable()` annotation. `ModuleInjector` 层次结构 —— 使用 `@NgModule()` 或 `@Injectable()` 注解在此层次结构中配置 `ModuleInjector`。 - 1. `ElementInjector` hierarchy—created implicitly at each DOM element. An `ElementInjector` is empty by default unless you configure it in the `providers` property on @@ -310,8 +309,7 @@ resolves it in two phases: 针对 `ElementInjector` 层次结构(其父级) - -2. Against the `ModuleInjector` hierarchy (its parents) +1. Against the `ModuleInjector` hierarchy (its parents) 针对 `ModuleInjector` 层次结构(其父级) From 3c16d249b936cf9d2ea1b038b2016b7169e835ee Mon Sep 17 00:00:00 2001 From: zhusir Date: Sun, 31 May 2020 20:22:44 +0800 Subject: [PATCH 7/7] =?UTF-8?q?docs:=20=E7=BF=BB=E8=AF=91=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #479 ,好像删除空行并没有两个行进入同一序列。之前的 #480 没有起到效果。我删掉了同一序列中两个空行的一行。顺便手工将序号修正。 --- aio/content/guide/hierarchical-dependency-injection.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aio/content/guide/hierarchical-dependency-injection.md b/aio/content/guide/hierarchical-dependency-injection.md index 57959de752..b30ca17ee7 100644 --- a/aio/content/guide/hierarchical-dependency-injection.md +++ b/aio/content/guide/hierarchical-dependency-injection.md @@ -25,7 +25,7 @@ in this hierarchy using an `@NgModule()` or `@Injectable()` annotation. `ModuleInjector` 层次结构 —— 使用 `@NgModule()` 或 `@Injectable()` 注解在此层次结构中配置 `ModuleInjector`。 -1. `ElementInjector` hierarchy—created implicitly at each +2. `ElementInjector` hierarchy—created implicitly at each DOM element. An `ElementInjector` is empty by default unless you configure it in the `providers` property on `@Directive()` or `@Component()`. @@ -309,7 +309,7 @@ resolves it in two phases: 针对 `ElementInjector` 层次结构(其父级) -1. Against the `ModuleInjector` hierarchy (its parents) +2. Against the `ModuleInjector` hierarchy (its parents) 针对 `ModuleInjector` 层次结构(其父级)