docs: 把一些指向英文站的链接改为指向中文站
This commit is contained in:
parent
601f165f3c
commit
f4dc1a6c61
@ -68,7 +68,7 @@ NOTE:
|
||||
|
||||
See the [Template Syntax](https://angular.io/guide/template-syntax#html-attribute-vs-dom-property) guide for more background on the difference between attributes and properties.
|
||||
|
||||
有关 Attribute 和 Property 之间差异的更多背景信息,请参见[模板语法](https://angular.io/guide/template-syntax#html-attribute-vs-dom-property)一章。
|
||||
有关 Attribute 和 Property 之间差异的更多背景信息,请参见[模板语法](https://angular.cn/guide/template-syntax#html-attribute-vs-dom-property)一章。
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -83,7 +83,7 @@ For example, your `myBuilder` folder could contain the following files.
|
||||
|
||||
You can publish the builder to `npm` (see [Publishing your Library](https://angular.io/guide/creating-libraries#publishing-your-library)). If you publish it as `@example/my-builder`, you can install it using the following command.
|
||||
|
||||
你可以把构建器发布到 `npm`(请参阅[发布你的库](https://angular.io/guide/creating-libraries#publishing-your-library))。如果把它发布成了 `@example/my-builder`,就可以使用下面的命令来安装它。
|
||||
你可以把构建器发布到 `npm`(请参阅[发布你的库](https://angular.cn/guide/creating-libraries#publishing-your-library))。如果把它发布成了 `@example/my-builder`,就可以使用下面的命令来安装它。
|
||||
|
||||
<code-example language="sh">
|
||||
|
||||
@ -411,7 +411,7 @@ Let’s create a simple `angular.json` file that puts target configurations into
|
||||
|
||||
We can publish the builder to npm (see [Publishing your Library](guide/creating-libraries#publishing-your-library)), and install it using the following command:
|
||||
|
||||
我们可以把这个构建器发布到 npm(请参阅[发布你的库](https://angular.io/guide/creating-libraries#publishing-your-library)),并使用如下命令来安装它:
|
||||
我们可以把这个构建器发布到 npm(请参阅[发布你的库](https://angular.cn/guide/creating-libraries#publishing-your-library)),并使用如下命令来安装它:
|
||||
|
||||
<code-example language="sh">
|
||||
|
||||
@ -479,7 +479,7 @@ We need to update the `angular.json` file to add a target for this builder to th
|
||||
|
||||
* The target named "touch" uses our builder, which we published to `@example/command-runner`. (See [Publishing your Library](guide/creating-libraries#publishing-your-library))
|
||||
|
||||
名为 `touch` 的目标使用了我们的构建器,它发布到了 `@example/command-runner`。(参见[发布你的库](https://angular.io/guide/creating-libraries#publishing-your-library) )
|
||||
名为 `touch` 的目标使用了我们的构建器,它发布到了 `@example/command-runner`。(参见[发布你的库](https://angular.cn/guide/creating-libraries#publishing-your-library) )
|
||||
|
||||
* The options object provides default values for the two inputs that we defined; `command`, which is the Unix command to execute, and `args`, an array that contains the file to operate on.
|
||||
|
||||
|
@ -87,7 +87,7 @@ This method is for development and testing only, and is not a supported or secur
|
||||
|
||||
The Angular CLI command `ng deploy` (introduced in version 8.3.0) executes the `deploy` [CLI builder](https://angular.io/guide/cli-builder) associated with your project. A number of third-party builders implement deployment capabilities to different platforms. You can add any of them to your project by running `ng add [package name]`.
|
||||
|
||||
Angular CLI 命令 `ng deploy`(在版本 8.3.0 中引入)执行与你的项目关联的 `deploy` [CLI 构建器](https://angular.io/guide/cli-builder)。有许多第三方构建器实现了到不同平台的部署功能。你可以通过运行 `ng add [package name]` 把它们中的任何一个添加到项目中。
|
||||
Angular CLI 命令 `ng deploy`(在版本 8.3.0 中引入)执行与你的项目关联的 `deploy` [CLI 构建器](https://angular.cn/guide/cli-builder)。有许多第三方构建器实现了到不同平台的部署功能。你可以通过运行 `ng add [package name]` 把它们中的任何一个添加到项目中。
|
||||
|
||||
When you add a package with deployment capability, it'll automatically update your workspace configuration (`angular.json` file) with a `deploy` section for the selected project. You can then use the `ng deploy` command to deploy that project.
|
||||
|
||||
|
@ -124,7 +124,7 @@ Files at the top level of `src/` support testing and running your application. S
|
||||
| `index.html` | The main HTML page that is served when someone visits your site. The CLI automatically adds all JavaScript and CSS files when building your app, so you typically don't need to add any `<script>` or`<link>` tags here manually. |
|
||||
| `index.html` | 当有人访问你的站点时,提供服务的主要 HTML 页面。CLI 会在构建你的应用时自动添加所有的 JavaScript 和 CSS 文件,所以你通常不用手动添加任何 `<script>` 或 `<link>` 标签。 |
|
||||
| `main.ts` | The main entry point for your application. Compiles the application with the [JIT compiler](https://angular.io/guide/glossary#jit) and bootstraps the application's root module (AppModule) to run in the browser. You can also use the [AOT compiler](https://angular.io/guide/aot-compiler) without changing any code by appending the `--aot` flag to the CLI `build` and `serve` commands. |
|
||||
| `main.ts` | 应用的主要切入点。用 [JIT 编译器](https://angular.io/guide/glossary#jit)编译应用,然后引导应用的根模块(AppModule)在浏览器中运行。你也可以在不改变任何代码的情况下改用 [AOT 编译器](https://angular.io/guide/aot-compiler),只要在 CLI 的 `build` 和 `serve` 命令中加上 `--aot` 标志就可以了。 |
|
||||
| `main.ts` | 应用的主要切入点。用 [JIT 编译器](https://angular.cn/guide/glossary#jit)编译应用,然后引导应用的根模块(AppModule)在浏览器中运行。你也可以在不改变任何代码的情况下改用 [AOT 编译器](https://angular.io/guide/aot-compiler),只要在 CLI 的 `build` 和 `serve` 命令中加上 `--aot` 标志就可以了。 |
|
||||
| `polyfills.ts` | Provides polyfill scripts for browser support. |
|
||||
| `polyfills.ts` | 为浏览器支持提供了腻子(polyfill)脚本。 |
|
||||
| `styles.sass` | Lists CSS files that supply styles for a project. The extension reflects the style preprocessor you have configured for the project. |
|
||||
@ -264,7 +264,7 @@ my-workspace/
|
||||
|
||||
When you generate a library using the CLI (with a command such as `ng generate library my-lib`), the generated files go into the projects/ folder of the workspace. For more information about creating your own libraries, see [Creating Libraries](https://angular.io/guide/creating-libraries).
|
||||
|
||||
当你使用 CLI 命令(例如 `ng generate library my-lib`)生成一个库时,所生成的文件会放在工作区的 `projects/` 文件夹中。关于如何创建自己的库的更多信息,请参阅[创建库](https://angular.io/guide/creating-libraries)一章。
|
||||
当你使用 CLI 命令(例如 `ng generate library my-lib`)生成一个库时,所生成的文件会放在工作区的 `projects/` 文件夹中。关于如何创建自己的库的更多信息,请参阅[创建库](https://angular.cn/guide/creating-libraries)一章。
|
||||
|
||||
Libraries (unlike applications and their associated e2e projects) have their own `package.json` configuration files.
|
||||
|
||||
|
@ -81,15 +81,15 @@ The result will be updated for changes to your view, such as changes to `ngIf` a
|
||||
For more information, see the following entries in the
|
||||
[Static Query Migration Guide](https://angular.io/guide/static-query-migration):
|
||||
|
||||
要了解更多信息,请参见[静态查询迁移指南](https://angular.io/guide/static-query-migration)中的以下条目:
|
||||
要了解更多信息,请参见[静态查询迁移指南](https://angular.cn/guide/static-query-migration)中的以下条目:
|
||||
|
||||
* [How do I choose which `static` flag value to use: `true` or `false`?](https://angular.io/guide/static-query-migration#how-do-i-choose-which-static-flag-value-to-use-true-or-false)
|
||||
|
||||
[如何选择使用哪个 `static` 标志值: `true` 还是 `false` ?](https://angular.io/guide/static-query-migration#how-do-i-choose-which-static-flag-value-to-use-true-or-false)
|
||||
[如何选择使用哪个 `static` 标志值: `true` 还是 `false` ?](https://angular.cn/guide/static-query-migration#how-do-i-choose-which-static-flag-value-to-use-true-or-false)
|
||||
|
||||
* [Is there a case where I should use `{static: true}`?](https://angular.io/guide/static-query-migration#is-there-a-case-where-i-should-use-static-true)
|
||||
|
||||
[哪些情况下我应该使用 `{static: true}` ?](https://angular.io/guide/static-query-migration#is-there-a-case-where-i-should-use-static-true)
|
||||
[哪些情况下我应该使用 `{static: true}` ?](https://angular.cn/guide/static-query-migration#is-there-a-case-where-i-should-use-static-true)
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -102,7 +102,7 @@ The following Angular packages are included as dependencies in the default `pack
|
||||
For a complete list of Angular packages, see the [API reference](http://angular.io/api?type=package).
|
||||
|
||||
新 Angular 工作区的 `package.json` 文件中默认包含下列 Angular 包。
|
||||
要了解 Angular 包的完整列表,参见 [API 参考手册](http://angular.io/api?type=package)。
|
||||
要了解 Angular 包的完整列表,参见 [API 参考手册](http://angular.cn/api?type=package)。
|
||||
|
||||
Package name | Description
|
||||
---------------------------------------- | --------------------------------------------------
|
||||
|
@ -74,7 +74,7 @@ For more information on how to choose, see the [next question](#how-do-i-choose)
|
||||
In the official API docs, we have always recommended retrieving query results in [`ngAfterViewInit` for view queries](https://angular.io/api/core/ViewChild#description) and [`ngAfterContentInit` for content queries](https://angular.io/api/core/ContentChild#description).
|
||||
This is because by the time those lifecycle hooks run, change detection has completed for the relevant nodes and we can guarantee that we have collected all the possible query results.
|
||||
|
||||
在官方 API 文档中,我们建议对于[视图查询](https://angular.io/api/core/ViewChild#description) 总是在 `ngAfterViewInit` 中获取查询结果,对于[内容查询](https://angular.io/api/core/ContentChild#description) 总是在 `ngAfterContentInit` 中获取查询结果。
|
||||
在官方 API 文档中,我们建议对于[视图查询](https://angular.cn/api/core/ViewChild#description) 总是在 `ngAfterViewInit` 中获取查询结果,对于[内容查询](https://angular.io/api/core/ContentChild#description) 总是在 `ngAfterContentInit` 中获取查询结果。
|
||||
这是因为当这些生命周期钩子运行时,相关节点的变更检测已完成,我们可以确信收集到了所有可能的查询结果。
|
||||
|
||||
Most applications will want to use `{static: false}` for the same reason. This setting will ensure query matches that are dependent on binding resolution (e.g. results inside `*ngIf`s or `*ngFor`s) will be found by the query.
|
||||
|
@ -2402,7 +2402,7 @@ You can't apply `[(ngModel)]` to a non-form native element or a
|
||||
third-party custom component until you write a suitable value accessor. For more information, see
|
||||
the API documentation on [DefaultValueAccessor](https://angular.io/api/forms/DefaultValueAccessor).
|
||||
|
||||
在编写适当的值访问器之前,不能将 `[(ngModel)]` 应用于非表单的原生元素或第三方自定义组件。欲知详情,参见[DefaultValueAccessor](https://angular.io/api/forms/DefaultValueAccessor)上的 API 文档。
|
||||
在编写适当的值访问器之前,不能将 `[(ngModel)]` 应用于非表单的原生元素或第三方自定义组件。欲知详情,参见[DefaultValueAccessor](https://angular.cn/api/forms/DefaultValueAccessor)上的 API 文档。
|
||||
|
||||
You don't need a value accessor for an Angular component that
|
||||
you write because you can name the value and event properties
|
||||
|
@ -180,7 +180,7 @@ Angular 还提供了更多功能,不过你现在已经有了基础,可以让
|
||||
|
||||
* Angular also has an extensive [network of 3rd-party tools and libraries](https://angular.io/resources "Angular resources list").
|
||||
|
||||
Angular 还拥有广泛的[第三方工具和库](https://angular.io/resources "Angular 资源列表")互助网。
|
||||
Angular 还拥有广泛的[第三方工具和库](https://angular.cn/resources "Angular 资源列表")互助网。
|
||||
|
||||
Keep current by following the [Angular blog](https://blog.angular.io/ "Angular blog").
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user