合并了最新更新,翻译了官方的发布声明

This commit is contained in:
Zhicheng Wang 2016-09-15 17:08:17 +08:00
parent 2417245114
commit e693d35fb1
16 changed files with 148 additions and 38 deletions

View File

@ -6,5 +6,5 @@ header(class="background-sky l-relative")
a(href="/docs/ts/latest/quickstart.html" class="hero-cta md-raised button button-large button-plain" md-button) 开始吧!
.announcement-bar.shadow-2.clearfix
img(src="/resources/images/logos/angular2/angular.svg")
p Angular 2.0最终发布啦!
a(href="http://angularjs.blogspot.com/2016/09/angular2-final.html" target="_blank" class="button " + "md-button") 了解更多
p Angular 2.0正式发布啦!
a(href="/translate/cn/blog.html" class="button " + "md-button") 了解更多

View File

@ -4,15 +4,15 @@
nav.main-nav.l-pinned-top.l-layer-5
h1 <a href="/" md-button>Angular <sup>by Google</sup></a>
button(class="main-nav-button main-nav-mobile-trigger l-right" aria-label="查看菜单" ng-click="appCtrl.toggleMainMenu($event)" md-button) 网站菜单 <span class="icon icon-arrow-drop-down"></span>
button(class="main-nav-button main-nav-mobile-trigger l-right" aria-label="查看菜单" ng-click="appCtrl.toggleMainMenu($event)" md-button) 网站菜单 <span class="icon icon-arrow-drop-down"></span>
ul(ng-class="appCtrl.showMainNav ? 'is-visible' : ''")
li.l-left <a class="main-nav-button" href="/features.html" md-button>特性</a>
li.l-left <a class="main-nav-button" href="/docs/#{language}/latest/" md-button>文档</a>
li.l-left <a class="main-nav-button" href="/events.html" md-button>会议</a>
li.l-left <a class="main-nav-button" href="/news.html" md-button>新闻</a>
li.l-left <a class="main-nav-button" href="/translate/cn/home.html" md-button>关于中文版</a>
li.l-right <a class="main-nav-button" href="/docs/ts/latest/quickstart.html" md-button>立即开始!</a>
li.l-right
a.main-nav-button.md-button.ng-cloak(ng-click="appCtrl.toggleSource($event)", href)
span {{appCtrl.sourceVisible?'Hide English':'Show English'}}
ul(ng-class="appCtrl.showMainNav ? 'is-visible' : ''")
li.l-left <a class="main-nav-button" href="/features.html" md-button>特性</a>
li.l-left <a class="main-nav-button" href="/docs/#{language}/latest/" md-button>文档</a>
li.l-left <a class="main-nav-button" href="/events.html" md-button>会议</a>
li.l-left <a class="main-nav-button" href="/news.html" md-button>新闻</a>
li.l-left <a class="main-nav-button" href="/translate/cn/home.html" md-button>关于中文版</a>
li.l-right <a class="main-nav-button" href="/docs/ts/latest/quickstart.html" md-button>立即开始!</a>
li.l-right
a.main-nav-button.md-button.ng-cloak(ng-click="appCtrl.toggleSource($event)", href)
span {{appCtrl.sourceVisible?'Hide English':'Show English'}}

View File

@ -182,7 +182,7 @@ include ../_util-fns
[location strategy](../guide/router.html#location-strategy) by listing its provider
in the `providers` list of the `AppModule`.
下面的例子时第二种情况下,配置一个非默认的[location strategy](../guide/router.html#location-strategy)的组件路由器,把它加入到`AppModule`的`providers`数组中。
下面的例子时第二种情况下,配置一个非默认的[location strategy](../guide/router.html#location-strategy)的路由器,把它加入到`AppModule`的`providers`数组中。
+makeExample('cb-dependency-injection/ts/app/app.module.ts','providers','app/app.module.ts (providers)')(format='.')

View File

@ -21,7 +21,7 @@ include ../_util-fns
The agency is constantly tinkering with the application process.
We can create the forms on the fly *without changing our application code*.
在本例中,我们使用动态表单,为正在找工作的英雄们创建一个在线申请表。职介中心会不断修改申请流程,我们要在*不修改应用代码*的情况下,动态创建这些表单。
在本例中,我们使用动态表单,为正在找工作的英雄们创建一个在线申请表。英雄管理局会不断修改申请流程,我们要在*不修改应用代码*的情况下,动态创建这些表单。
<a id="toc"></a>
:marked

View File

@ -242,7 +242,7 @@ a#q-why-cant-bind-to
Perhaps you declared "x" in an application sub-module but forgot to export it?
The "x" class won't be visible to other modules until you add it to the `exports` list.
也可能你在该应用的模块中声明了“x”但是忘了从那个模块导出它。
也可能你在该应用的特性模块中声明了“x”但是忘了从那个模块导出它。
除非你把这个“x”类加入了`exports`列表中,否则它对其它模块将是不可见的。
.l-hr

View File

@ -874,7 +874,7 @@ a#Q
The Angular [component router](!{docsLatest}/guide/router.html) is a richly featured mechanism for configuring and managing the entire view navigation process including the creation and destruction
of views.
Angular的[组件路由器(Component Router)](!{docsLatest}/guide/router.html)是一个特性丰富的机制,它可以配置和管理整个导航过程,包括建立和销毁视图。
Angular的[路由器(Component Router)](!{docsLatest}/guide/router.html)是一个特性丰富的机制,它可以配置和管理整个导航过程,包括建立和销毁视图。
+ifDocsFor('ts|js')
:marked

View File

@ -99,7 +99,7 @@ figure.image-display
Here at the *Hero Employment Agency* we use this form to maintain personal information about the
heroes in our stable. Every hero needs a job. It's our company mission to match the right hero with the right crisis!
这里是*英雄职介中心*,我们使用这个表单来维护候选英雄们的个人信息。每个英雄都需要一份工作。我们公司的任务就是让适当的英雄去解决他/她所擅长应对的危机!
这里是*英雄管理局*,我们使用这个表单来维护候选英雄们的个人信息。每个英雄都需要一份工作。我们公司的任务就是让适当的英雄去解决他/她所擅长应对的危机!
Two of the three fields on this form are required. Required fields have a green bar on the left to make them easy to spot.
@ -461,7 +461,7 @@ ol
Our hero may choose one super power from a fixed list of Agency-approved powers.
We maintain that list internally (in `HeroFormComponent`).
我们的英雄可以从由职介中心认证过的固定列表中选择一项超能力。
我们的英雄可以从由英雄管理局认证过的固定列表中选择一项超能力。
我们先在`HeroFormComponent`中内部维护这个列表。
We'll add a `select` to our

View File

@ -1132,7 +1132,7 @@ a#lazy-load
Both modules are in the early stages of development.
Their specifics aren't important to the story and we won't discuss every line of code.
职介中心”这个例子应用继续成长。
英雄管理局”这个例子应用继续成长。
它又增加了两个模块,一个用来管理雇佣的英雄,另一个用来匹配英雄与危机。
这两个模块都还处于前期开发阶段。
它们对于整个故事来说无关紧要,这里我们就不逐行讨论了。

View File

@ -138,7 +138,7 @@ a(id="dependencies")
***@angular/router*** - Component router.
***@angular/router*** - 组件路由器。
***@angular/router*** - 路由器。
***@angular/upgrade*** - Set of utilities for upgrading Angular 1 applications.

View File

@ -4,7 +4,7 @@ include ../_util-fns
The Angular ***Router*** enables navigation from one [view](./glossary.html#view) to the next
as users perform application tasks.
在用户使用应用程序时Angular的***组件路由器***能让用户从一个[视图](./glossary.html#view)导航到另一个视图。
在用户使用应用程序时Angular的***路由器***能让用户从一个[视图](./glossary.html#view)导航到另一个视图。
We cover the router's primary features in this chapter, illustrating them through the evolution
of a small application that we can <live-example>run live</live-example>.
@ -594,8 +594,8 @@ table
Our client is the Hero Employment Agency.
Heroes need work and The Agency finds Crises for them to solve.
我们的客户是“英雄职介中心”。
英雄们需要找工作,而“职介中心”为他们寻找待解决的危机。
我们的客户是“英雄管理局”。
英雄们需要找工作,而“英雄管理局”为他们寻找待解决的危机。
The application has three main feature areas:
@ -607,7 +607,7 @@ table
1. A *Heroes* area where we maintain the list of heroes employed by The Agency.
1. 一个*英雄*区,它维护由职介中心雇佣的英雄列表。
1. 一个*英雄*区,它维护由英雄管理局雇佣的英雄列表。
1. An *Admin* area where we manage the list of crises and heroes displayed.
@ -781,7 +781,7 @@ a#base-href
for navigation. Thanks to `pushState`, we can make our in-app URL paths look the way we want them to
look, e.g. `localhost:3000/crisis-center`. Our in-app URLs can be indistinguishable from server URLs.
组件路由器使用浏览器的[history.pushState](https://developer.mozilla.org/en-US/docs/Web/API/History_API#Adding_and_modifying_history_entries)进行导航。
路由器使用浏览器的[history.pushState](https://developer.mozilla.org/en-US/docs/Web/API/History_API#Adding_and_modifying_history_entries)进行导航。
感谢`pushState`有了它我们就能按所期望的样子来显示应用内部的URL路径比如`localhost:3000/crisis-center`。虽然我们使用的全部是客户端合成的视图但应用内部的这些URL看起来和来自服务器的没有什么不同。
Modern HTML 5 browsers were the first to support `pushState` which is why many people refer to these URLs as
@ -812,7 +812,7 @@ a#base-href
Learn why "HTML 5" style is preferred, how to adjust its behavior, and how to switch to the
older hash (#) style if necessary in the [Browser URL Styles](#browser-url-styles) appendix below.
HTML 5风格的导航是组件路由器的默认值。请到下面的附录[浏览器URL风格](#browser-url-styles)中学习为什么首选“HTML 5”风格、如何调整它的行为以及如何在必要时切换回老式的hash#)风格。
HTML 5风格的导航是路由器的默认值。请到下面的附录[浏览器URL风格](#browser-url-styles)中学习为什么首选“HTML 5”风格、如何调整它的行为以及如何在必要时切换回老式的hash#)风格。
:marked
.l-sub-section
@ -850,7 +850,7 @@ a#base-href
It's not part of the Angular 2 core. The router is an optional service because not all applications
need routing and, depending on your requirements, you may need a different routing library.
组件路由器在它自己的`@angular/router`包中。
路由器在它自己的`@angular/router`包中。
它不是Angular 2内核的一部分。该路由器是可选的服务这是因为并不是所有应用都需要路由并且如果需要你还可能需要另外的路由库。
We teach our router how to navigate by configuring it with routes.
@ -1895,7 +1895,7 @@ h3#merge-hero-routes Import hero module into AppModule
now. This is important because their can be only **one** owner for a declared component. In our case, the `Heroes` module is
the owner of the `Heroes` components and is making them available to the `AppModule`.
我们从根NgModule的`declarations`中移除了`HeroListComponent`,因为它现在改有`HeroesModule`提供了。
我们从`AppModule`的`declarations`中移除了`HeroListComponent`,因为它现在改有`HeroesModule`提供了。
这一步很重要,因为一个组件只能有**一个**所有者。现在这种情况下,`Heroes`模块应该是`Heroes`组件的所有者,并让它可用于`AppModule`中。
.l-sub-section
@ -2184,7 +2184,7 @@ a#child-routing-component
we register the `CrisisService` in the `CrisisCenterModule` providers array.
在*危机中心*领域之外既不需要也没人想要`CrisisService`。
与其在根NgModule的提供商中注册它导致它在应用的任何地方都可见,不如在`CrisisCenterModule`的`providers`数组中注册`CrisisService`。
与其在`AppModule`的提供商中注册它导致它在应用的任何地方都可见,不如在`CrisisCenterModule`的`providers`数组中注册`CrisisService`。
+makeExcerpt('app/crisis-center/crisis-center.module.1.ts', 'providers', '')
@ -2307,7 +2307,7 @@ h3#import-crisis-module 把危机中心模块导入`AppModule`的路由中
are now being provided by our `HeroesModule` and our `CrisisCenter` feature modules. We'll keep our `app.routing.ts` file
for general routes which we'll cover later in the chapter.
我们还从`app.routing.ts`中移除了危机中心的初始路由。我们的路由现在是由`HeroesModule`和`CrisisCenter`模块提供的。
我们还从`app.routing.ts`中移除了危机中心的初始路由。我们的路由现在是由`HeroesModule`和`CrisisCenter`特性模块提供的。
我们将保持`app.routing.ts`文件中只有通用路由,本章稍后会讲解它。
+makeExcerpt('app/app.routing.4.ts (v3)', '')

View File

@ -1,56 +1,83 @@
.clearfix
a.card.c4(href="/docs/#{current.path[1]}/#{current.path[2]}/quickstart.html")
h2.text-headline.text-uppercase Quickstart
h2.text-headline.text-uppercase 快速起步
p A short beginner guide explaining the basic concepts of Angular
p 一个简短的初学者指南用以解释Angular的基本概念
footer View Quickstart
footer
p View Quickstart
p 查看“快速起步”
a.card.c4(href="/docs/#{current.path[1]}/#{current.path[2]}/guide/")
h2.text-headline.text-uppercase Developer Guide
h2.text-headline.text-uppercase 开发指南
p An intermediate development guide covering all major features of Angular
p 一个面向中级开发者的指南覆盖了Angular的所有主要特性
footer View Guide
footer
p View Guide
p 查看开发指南
a.card.c4(href="/docs/#{current.path[1]}/#{current.path[2]}/api/")
h2.text-headline.text-uppercase API Reference
h2.text-headline.text-uppercase API参考手册
p An advanced reference of all Angular Classes, Methods, etc.
p 一个高级的参考手册包括所有的Angular类、方法等。
footer View API
footer
p View API
p 查看API参考手册
.c4.secondary-content-list
h4 Advanced Documentation
h4 高级文档
ul
li
a(href="/docs/ts/latest/guide/ngmodule.html") Angular Modules
a(href="/docs/ts/latest/guide/ngmodule.html") Angular模块
li
a(href="/docs/ts/latest/guide/animations.html") Animations
a(href="/docs/ts/latest/guide/animations.html") 动画
li
a(href="/docs/ts/latest/guide/attribute-directives.html") Attribute Directives
a(href="/docs/ts/latest/guide/attribute-directives.html") 属性型指令
li
a(href="/docs/ts/latest/guide/browser-support.html") Browser Support
a(href="/docs/ts/latest/guide/browser-support.html") 浏览器支持
li
a(href="/docs/ts/latest/guide/component-styles.html") Component Styles
a(href="/docs/ts/latest/guide/component-styles.html") 组件样式
li
a(href="/docs/ts/latest/guide/ngmodule.html") View All...
a(href="/docs/ts/latest/guide/ngmodule.html") 查看全部……
.c4.secondary-content-list
h4 Cookbook
h4 烹饪宝典
ul
li
a(href="/docs/ts/latest/cookbook/aot-compiler.html") Ahead-of-Time Compilation
a(href="/docs/ts/latest/cookbook/aot-compiler.html") 预编译
li
a(href="/docs/ts/latest/cookbook/a1-a2-quick-reference.html") Angular 1 to Angular 2
a(href="/docs/ts/latest/cookbook/a1-a2-quick-reference.html") Angular 1迁移到Angular 2
li
a(href="/docs/ts/latest/cookbook/ngmodule-faq.html") Angular Module FAQ
a(href="/docs/ts/latest/cookbook/ngmodule-faq.html") Angular模块FAQ
li
a(href="/docs/ts/latest/cookbook/component-communication.html") Component Interaction
a(href="/docs/ts/latest/cookbook/component-communication.html") 组件交互
li
a(href="/docs/ts/latest/cookbook/component-relative-paths.html") Component-Relative Paths
a(href="/docs/ts/latest/cookbook/component-relative-paths.html") 相对于组件的路径
li
a(href="/docs/ts/latest/cookbook/") View All...
a(href="/docs/ts/latest/cookbook/") 查看全部……
.c4.secondary-content-list
h4 Tools & Libraries
h4 工具与库
ul
li
a(target="_blank" href="https://github.com/angular/universal") Angular Universal
@ -58,9 +85,11 @@
a(target="_blank" href="https://augury.angular.io/") Augury
li
a(target="_blank" href="https://github.com/jaxio/celerio-angular-quickstart") Celerio Angular Quickstart
a(target="_blank" href="https://github.com/jaxio/celerio-angular-quickstart") Celerio Angular快速起步
li
a(target="_blank" href="https://github.com/mgechev/codelyzer") Codelyzer
li
a(target="_blank" href="https://github.com/johnpapa/lite-server") Lite-server
li
a(target="_blank" href="/resources/") View All...
a(target="_blank" href="/resources/") 查看全部……

View File

@ -9,7 +9,7 @@ include ../_util-fns
Our grand plan is to build an app to help a staffing agency manage its stable of heroes.
Even heroes need to find work.
我们的终极计划是构建一个程序,来帮助职介中心管理英雄围栏(译注比如WoW登录后看到的那个列表就是“英雄围栏”)。毕竟,英雄们也得养家糊口嘛!
我们的终极计划是构建一个程序,来帮助英雄管理局管理英雄围栏(译注比如WoW登录后看到的那个列表就是“英雄围栏”)。毕竟,英雄们也得养家糊口嘛!
Of course we'll only make a little progress in this tutorial. What we do build will
have many of the features we expect to find in a full-blown, data-driven application: acquiring and displaying

View File

@ -42,7 +42,7 @@ figure.image-display
:marked
We'll add Angulars *Component Router* to our app to satisfy these requirements.
我们将把Angular*组件路由器*加入应用中,以满足这些需求。(译注:硬件领域中的路由器是用来帮你找到另一台网络设备的,而这里的路由器用于帮你找到一个组件)
我们将把Angular*路由器*加入应用中,以满足这些需求。(译注:硬件领域中的路由器是用来帮你找到另一台网络设备的,而这里的路由器用于帮你找到一个组件)
.l-sub-section
:marked
@ -311,7 +311,7 @@ block app-comp-v1
We'll need the Angular *Component Router*.
我们需要Angular的*组件路由器*。
我们需要Angular的*路由器*。
block angular-router
:marked
@ -1475,7 +1475,7 @@ block file-tree-end
- We added the Angular *Component Router* to navigate among different components.
- 我们添加了Angular*组件路由器*在各个不同组件之间导航。
- 我们添加了Angular*路由器*在各个不同组件之间导航。
- We learned how to create router links to represent navigation menu items.

View File

@ -10,5 +10,9 @@
"home": {
"title": "官方中文版简介",
"subtitle": "Angular官方中文版的简介、致辞等"
},
"blog": {
"title": "Angular 2震撼登场",
"subtitle": "万众瞩目之下Angular 2终于正式发布啦"
}
}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 KiB