fix: change some angular.io to angular.cn

This commit is contained in:
Zhicheng Wang 2018-03-26 16:34:57 +08:00
parent a9406a5ea9
commit b433d2148c
10 changed files with 15 additions and 15 deletions

View File

@ -232,7 +232,7 @@ Data binding plays an important role in communication between a template and its
To specify a value transformation in an HTML template, use the [pipe operator (|)](https://angular.io/guide/template-syntax#pipe):
要在 HTML 模板中指定值的转换方式,请使用 [管道操作符 (|)](https://angular.io/guide/template-syntax#pipe)。
要在 HTML 模板中指定值的转换方式,请使用 [管道操作符 (|)](https://angular.cn/guide/template-syntax#pipe)。
`{{interpolated_value | pipe_name}}`

View File

@ -9,7 +9,7 @@ Angular 的文档将持续不断的更新和改进。本日志记录了近期最
## Updated to Angular 4.0. Documentation for Angular 2.x can be found at [v2.angular.io](https://v2.angular.io).
## 更新到 Angular 4.0 。Angular 2.x 的文档在 [v2.angular.io](https://v2.angular.io) 。
## 更新到 Angular 4.0 。Angular 2.x 的文档在 [v2.angular.cn](https://v2.angular.io) 。
## All mention of moduleId removed. "Component relative paths" guide deleted (2017-03-13)
@ -259,7 +259,7 @@ This was [removed in August 2017](https://github.com/angular/angular/pull/18694)
viewed in the [v2 documentation](https://v2.angular.io/docs/ts/latest/cookbook/ts-to-js.html).
本章已经 [于 2017 年 8 月移除](https://github.com/angular/angular/pull/18694)
不过仍然可以在[第二版的文档中](https://v2.angular.io/docs/ts/latest/cookbook/ts-to-js.html)看到。
不过仍然可以在[第二版的文档中](https://v2.angular.cn/docs/ts/latest/cookbook/ts-to-js.html)看到。
## Sync with Angular v.2.1.1 (2016-10-21)

View File

@ -301,7 +301,7 @@ For example, given the `<base href="/my/app/">`, the browser resolves a URL such
into a server request for `my/app/some/place/foo.jpg`.
During navigation, the Angular router uses the _base href_ as the base path to component, template, and module files.
HTML 中的[_&lt;base href="..."/&gt;_](https://angular.io/docs/ts/latest/guide/router.html#!)用于指定一个解析相对路径的基地址,如图片、脚本和样式表。
HTML 中的[_&lt;base href="..."/&gt;_](/guide/router)用于指定一个解析相对路径的基地址,如图片、脚本和样式表。
比如,指定 `<base href="/my/app/">` 时,浏览器就会把 `some/place/foo.jpg` 这样的 URL 解析成到 `my/app/some/place/foo.jpg` 的服务端请求。
在浏览期间Angular 路由器会使用*base href*作为组件、模板和模块文件的基地址。

View File

@ -368,7 +368,7 @@ The following table summarizes the `@NgModule` metadata properties.
That leaves only components bootstrapped using one of the imperative techniques, such as [`ViewComponentRef.createComponent()`](https://angular.io/api/core/ViewContainerRef#createComponent) as undiscoverable.
而那些使用不易察觉的[`ViewComponentRef.createComponent()`](https://angular.io/api/core/ViewContainerRef#createComponent)的方式进行命令式引导的组件仍然需要添加。
而那些使用不易察觉的[`ViewComponentRef.createComponent()`](https://angular.cn/api/core/ViewContainerRef#createComponent)的方式进行命令式引导的组件仍然需要添加。
Dynamic component loading is not common in most apps beyond the router. If you need to dynamically load components, you must add these components to the `entryComponents` list yourself.

View File

@ -66,7 +66,7 @@ Angular 的 `HttpClient` 从 HTTP 方法调用中返回了可观察对象。例
The [AsyncPipe](https://angular.io/api/common/AsyncPipe) subscribes to an observable or promise and returns the latest value it has emitted. When a new value is emitted, the pipe marks the component to be checked for changes.
[AsyncPipe](https://angular.io/api/common/AsyncPipe) 会订阅一个可观察对象或承诺,并返回其发出的最后一个值。当发出新值时,该管道就会把这个组件标记为需要进行变更检查的(译注:因此可能导致刷新界面)。
[AsyncPipe](https://angular.cn/api/common/AsyncPipe) 会订阅一个可观察对象或承诺,并返回其发出的最后一个值。当发出新值时,该管道就会把这个组件标记为需要进行变更检查的(译注:因此可能导致刷新界面)。
The following example binds the `time` observable to the component's view. The observable continuously updates the view with the current time.
@ -80,7 +80,7 @@ The following example binds the `time` observable to the component's view. The o
[`Router.events`](https://angular.io/api/router/Router#events) provides events as observables. You can use the `filter()` operator from RxJS to look for events of interest, and subscribe to them in order to make decisions based on the sequence of events in the navigation process. Here's an example:
[`Router.events`](https://angular.io/api/router/Router#events) 以可观察对象的形式提供了其事件。
[`Router.events`](https://angular.cn/api/router/Router#events) 以可观察对象的形式提供了其事件。
你可以使用 RxJS 中的 `filter()` 操作符来找到感兴趣的事件,并且订阅它们,以便根据浏览过程中产生的事件序列作出决定。
例子如下:
@ -88,7 +88,7 @@ The following example binds the `time` observable to the component's view. The o
The [ActivatedRoute](https://angular.io/api/router/ActivatedRoute) is an injected router service that makes use of observables to get information about a route path and parameters. For example, `ActivateRoute.url` contains an observable that reports the route path or paths. Here's an example:
[ActivatedRoute](https://angular.io/api/router/ActivatedRoute) 是一个可注入的路由器服务,它使用可观察对象来获取关于路由路径和路由参数的信息。比如,`ActivateRoute.url` 包含一个用于汇报路由路径的可观察对象。例子如下:
[ActivatedRoute](https://angular.cn/api/router/ActivatedRoute) 是一个可注入的路由器服务,它使用可观察对象来获取关于路由路径和路由参数的信息。比如,`ActivateRoute.url` 包含一个用于汇报路由路径的可观察对象。例子如下:
<code-example path="observables-in-angular/src/main.ts" title="ActivatedRoute" region="activated_route"></code-example>
@ -99,6 +99,6 @@ The [ActivatedRoute](https://angular.io/api/router/ActivatedRoute) is an injecte
Reactive forms have properties that use observables to monitor form control values. The [`FormControl`](https://angular.io/api/forms/FormControl) properties `valueChanges` and `statusChanges` contain observables that raise change events. Subscribing to an observable form-control property is a way of triggering application logic within the component class. For example:
响应式表单具有一些属性,它们使用可观察对象来监听表单控件的值。
[`FormControl`](https://angular.io/api/forms/FormControl) 的 `valueChanges` 属性和 `statusChanges` 属性包含了会发出变更事件的可观察对象。订阅可观察的表单控件属性是在组件类中触发应用逻辑的途径之一。比如:
[`FormControl`](https://angular.cn/api/forms/FormControl) 的 `valueChanges` 属性和 `statusChanges` 属性包含了会发出变更事件的可观察对象。订阅可观察的表单控件属性是在组件类中触发应用逻辑的途径之一。比如:
<code-example path="observables-in-angular/src/main.ts" title="Reactive forms" region="forms"></code-example>

View File

@ -150,7 +150,7 @@ export class AppComponent implements OnInit {
// TODO(pbd): consider whether we can lookup the stable and next versions from the internet
const computedVersions: NavigationNode[] = [
{ title: 'next', url: 'https://next.angular.io' },
{ title: 'stable', url: 'https://angular.io' },
{ title: 'stable', url: 'https://angular.cn' },
];
if (this.deployment.mode === 'archive') {
computedVersions.push({ title: `v${versionInfo.major}` });

View File

@ -6,7 +6,7 @@ import { VersionInfo } from 'app/navigation/navigation.service';
template: `
<div *ngIf="mode == 'archive'" class="mode-banner">
This is the <strong>archived documentation for Angular v{{version?.major}}.</strong>
Please visit <a href="https://angular.io/">angular.io</a> to see documentation for the current version of Angular.
Please visit <a href="https://angular.cn/">angular.io</a> to see documentation for the current version of Angular.
</div>
`
})

View File

@ -1,4 +1,4 @@
# Allow all URLs (see http://www.robotstxt.org/robotstxt.html)
User-agent: *
Disallow:
Sitemap: https://angular.io/generated/sitemap.xml
Sitemap: https://angular.cn/generated/sitemap.xml

View File

@ -13,7 +13,7 @@
"@type": "ListItem",
"position": {$ loop.index $},
"item": {
"@id": "https://angular.io/{$ crumb.path $}",
"@id": "https://angular.cn/{$ crumb.path $}",
"name": "{$ crumb.text $}"
}
}{% endfor %}

View File

@ -2,6 +2,6 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- for url in doc.urls %}
<url>
<loc>https://angular.io/{$ url $}</loc>
<loc>https://angular.cn/{$ url $}</loc>
</url>{% endfor %}
</urlset>
</urlset>