diff --git a/public/_includes/_footer.jade b/public/_includes/_footer.jade index d03ad20286..8d42fdd67d 100644 --- a/public/_includes/_footer.jade +++ b/public/_includes/_footer.jade @@ -13,7 +13,7 @@ else .c3.main-footer-branding .logo-inverse-large - .c3 + .c2 h3.text-headline RESOURCES h3.text-headline 资源库 @@ -31,7 +31,7 @@ else li Press Kit li 宣传资料 - .c3 + .c2 h3.text-headline HELP h3.text-headline 帮助 @@ -47,7 +47,7 @@ else li Site Feedback li 网站反馈 - .c3 + .c2 h3.text-headline COMMUNITY h3.text-headline 社区 @@ -63,6 +63,11 @@ else li Contribute li 做贡献 + .c2 + h3.text-headline LANGUAGES + + ul.text-body + li 中文版 footer(class="background-steel") p diff --git a/public/docs/_examples/package.json b/public/docs/_examples/package.json index f6d67f4ce9..9e085a4714 100644 --- a/public/docs/_examples/package.json +++ b/public/docs/_examples/package.json @@ -32,7 +32,7 @@ "@angular/http": "2.0.0-rc.4", "@angular/platform-browser": "2.0.0-rc.4", "@angular/platform-browser-dynamic": "2.0.0-rc.4", - "@angular/router": "3.0.0-beta.1", + "@angular/router": "3.0.0-beta.2", "@angular/router-deprecated": "2.0.0-rc.2", "@angular/upgrade": "2.0.0-rc.4", "angular2-in-memory-web-api": "0.0.14", diff --git a/public/docs/_examples/quickstart/dart/lib/app_component.dart b/public/docs/_examples/quickstart/dart/lib/app_component.dart index a54b6f7a1f..6e089a6303 100644 --- a/public/docs/_examples/quickstart/dart/lib/app_component.dart +++ b/public/docs/_examples/quickstart/dart/lib/app_component.dart @@ -1,5 +1,4 @@ -// #docregion -// #docregion import +// #docregion , import import 'package:angular2/core.dart'; // #enddocregion import diff --git a/public/docs/_examples/quickstart/dart/pubspec.yaml b/public/docs/_examples/quickstart/dart/pubspec.yaml index bfd1edd5d4..780bd7b93c 100644 --- a/public/docs/_examples/quickstart/dart/pubspec.yaml +++ b/public/docs/_examples/quickstart/dart/pubspec.yaml @@ -1,5 +1,5 @@ # #docregion -name: angular2_getting_started +name: angular2_quickstart description: QuickStart version: 0.0.1 environment: diff --git a/public/docs/_examples/quickstart/dart/web/main.dart b/public/docs/_examples/quickstart/dart/web/main.dart index 19b47a1237..b542eebb9f 100644 --- a/public/docs/_examples/quickstart/dart/web/main.dart +++ b/public/docs/_examples/quickstart/dart/web/main.dart @@ -1,7 +1,7 @@ // #docregion import 'package:angular2/platform/browser.dart'; -import 'package:angular2_getting_started/app_component.dart'; +import 'package:angular2_quickstart/app_component.dart'; void main() { bootstrap(AppComponent); diff --git a/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.2.ts b/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.2.ts index 43eadbd55e..5f44ba160a 100644 --- a/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.2.ts +++ b/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.2.ts @@ -10,7 +10,7 @@ export const CrisisCenterRoutes: RouterConfig = [ { path: '', redirectTo: '/crisis-center', - terminal: true + pathMatch: 'full' }, // #enddocregion redirect { diff --git a/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.3.ts b/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.3.ts index 1f194ac6f7..75af21c534 100644 --- a/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.3.ts +++ b/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.3.ts @@ -12,7 +12,7 @@ export const CrisisCenterRoutes: RouterConfig = [ { path: '', redirectTo: '/crisis-center', - terminal: true + pathMatch: 'full' }, { path: 'crisis-center', diff --git a/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.4.ts b/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.4.ts index f238e132a7..b49bf6dfda 100644 --- a/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.4.ts +++ b/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.4.ts @@ -13,7 +13,7 @@ export const CrisisCenterRoutes: RouterConfig = [ { path: '', redirectTo: '/crisis-center', - terminal: true + pathMatch: 'full' }, { path: 'crisis-center', diff --git a/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.ts b/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.ts index a924aa5771..6f40ce64b3 100644 --- a/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.ts +++ b/public/docs/_examples/router/ts/app/crisis-center/crisis-center.routes.ts @@ -12,7 +12,7 @@ export const CrisisCenterRoutes: RouterConfig = [ { path: '', redirectTo: '/crisis-center', - terminal: true + pathMatch: 'full' }, { path: 'crisis-center', diff --git a/public/docs/_examples/router/ts/index.1.html b/public/docs/_examples/router/ts/index.1.html index a560164d1d..dbf32ae565 100644 --- a/public/docs/_examples/router/ts/index.1.html +++ b/public/docs/_examples/router/ts/index.1.html @@ -3,7 +3,7 @@ - + Router Sample v.1 diff --git a/public/docs/_examples/router/ts/index.2.html b/public/docs/_examples/router/ts/index.2.html index 320e546c31..2330a69e75 100644 --- a/public/docs/_examples/router/ts/index.2.html +++ b/public/docs/_examples/router/ts/index.2.html @@ -2,7 +2,7 @@ - + Router Sample v.2 diff --git a/public/docs/_examples/router/ts/index.3.html b/public/docs/_examples/router/ts/index.3.html index 3cc7fe0b6f..a142bb6fcc 100644 --- a/public/docs/_examples/router/ts/index.3.html +++ b/public/docs/_examples/router/ts/index.3.html @@ -2,7 +2,7 @@ - + Router Sample v.3 diff --git a/public/docs/_examples/router/ts/index.html b/public/docs/_examples/router/ts/index.html index 5a26972f4f..b15ea73dfa 100644 --- a/public/docs/_examples/router/ts/index.html +++ b/public/docs/_examples/router/ts/index.html @@ -4,7 +4,7 @@ - + Router Sample diff --git a/public/docs/_examples/toh-5/ts/app/app.routes.1.ts b/public/docs/_examples/toh-5/ts/app/app.routes.1.ts index 17f2df4e98..8b4d582680 100644 --- a/public/docs/_examples/toh-5/ts/app/app.routes.1.ts +++ b/public/docs/_examples/toh-5/ts/app/app.routes.1.ts @@ -11,7 +11,7 @@ export const routes: RouterConfig = [ { path: '', redirectTo: '/dashboard', - terminal: true + pathMatch: 'full' }, // #enddocregion redirect-route // #docregion dashboard-route diff --git a/public/docs/_examples/toh-5/ts/app/app.routes.ts b/public/docs/_examples/toh-5/ts/app/app.routes.ts index b4f1f1efa1..33097804eb 100644 --- a/public/docs/_examples/toh-5/ts/app/app.routes.ts +++ b/public/docs/_examples/toh-5/ts/app/app.routes.ts @@ -11,7 +11,7 @@ export const routes: RouterConfig = [ { path: '', redirectTo: '/dashboard', - terminal: true + pathMatch: 'full' }, { path: 'dashboard', diff --git a/public/docs/_examples/toh-6/ts/app/app.routes.ts b/public/docs/_examples/toh-6/ts/app/app.routes.ts index b299102385..1d9adf33fd 100644 --- a/public/docs/_examples/toh-6/ts/app/app.routes.ts +++ b/public/docs/_examples/toh-6/ts/app/app.routes.ts @@ -9,7 +9,7 @@ export const routes: RouterConfig = [ { path: '', redirectTo: '/dashboard', - terminal: true + pathMatch: 'full' }, { path: 'dashboard', diff --git a/public/docs/dart/latest/quickstart.jade b/public/docs/dart/latest/quickstart.jade index 10955b42f5..7352d90826 100644 --- a/public/docs/dart/latest/quickstart.jade +++ b/public/docs/dart/latest/quickstart.jade @@ -167,7 +167,7 @@ block server-watching block project-file-structure .filetree - .file angular2-quickstart + .file angular2_quickstart .children .file lib .children diff --git a/public/docs/dart/latest/tutorial/toh-pt5.jade b/public/docs/dart/latest/tutorial/toh-pt5.jade index 0315a43834..4dedf71c17 100644 --- a/public/docs/dart/latest/tutorial/toh-pt5.jade +++ b/public/docs/dart/latest/tutorial/toh-pt5.jade @@ -27,7 +27,7 @@ p Run the #[+liveExampleLink2('', 'toh-5')] for this part. and hero detail component. If not, we’ll need to go back and follow the previous chapters. .filetree - .file angular2-tour-of-heroes + .file angular2_tour_of_heroes .children .file lib .children @@ -659,7 +659,7 @@ p. :marked .filetree - .file angular2-tour-of-heroes + .file angular2_tour_of_heroes .children .file lib .children diff --git a/public/docs/dart/latest/tutorial/toh-pt6.jade b/public/docs/dart/latest/tutorial/toh-pt6.jade index 694975a368..eb24dd0d9d 100644 --- a/public/docs/dart/latest/tutorial/toh-pt6.jade +++ b/public/docs/dart/latest/tutorial/toh-pt6.jade @@ -91,7 +91,7 @@ block review block filetree .filetree - .file angular2-tour-of-heroes + .file angular2_tour_of_heroes .children .file lib .children diff --git a/public/docs/ts/latest/guide/router.jade b/public/docs/ts/latest/guide/router.jade index dc1682c9c7..43240b62b5 100644 --- a/public/docs/ts/latest/guide/router.jade +++ b/public/docs/ts/latest/guide/router.jade @@ -1891,26 +1891,21 @@ code-example(format=""). 它无法匹配上我们配置过的任何路由,这意味着在应用启动的时候它将不会显示任何组件。 用户必须点击一个导航链接来触发导航并显示点什么。 - We want the application to display the list of crises as it would if we pasted `localhost:3000/crisis-center/` into the address bar. + We prefer that the application display the list of crises as it would if the user clicked the "Crisis Center" link or pasted `localhost:3000/crisis-center/` into the address bar. This is our intended default route. + + 当用户点击了“Crisis Center”链接或者在地址栏粘贴`localhost:3000/crisis-center/`时,我们更希望该应用能直接显示危机列表。这就是默认路由。 - 我们希望该应用显示一个危机列表,就像在地址栏输入`localhost:3000/crisis-center/`时一样。这就是默认路由。 - - We can arrange for that behavior in several ways. - One way is to use a `redirect` to transparently navigate from one route to another. - - 我们可以用多种方式实现此行为。其一是使用`redirect`来从一个路由透明的导航到另一个。 - - In our example, we'll add a route to match our initial URL and redirect to our `crisis-center` route: - - 在这个例子中,我们将添加一个路由来匹配最初的URL,并重定向到`crisis-center`路由: - + The preferred solution is to add a `redirect` route that transparently translates from the initial URL (`''`) to the preferred default path (`/crisis-center`): + + 首选的解决方案是添加一个`redirect`路由,它会透明的把初始URL(`''`)翻译成默认路径(`/crisis-center`)。 + +makeExample('router/ts/app/crisis-center/crisis-center.routes.2.ts', 'redirect', 'app/crisis-center/crisis-center.routes.ts (redirect route)' )(format='.') :marked - Since we only want to redirect when our path specifically matches `''`, we've added an extra configuration - to our route using `terminal: true`. Mainly for redirects, the `terminal` property tells the router - whether or not it should continue matching our URL against the rest of our defined routes. + A redirect route requires a `pathMatch` property to tell the router how to match a URL to the path of a route. + In this app, the router should select the route to `CrisisCenterComponent` when the *entire URL* matches `''`, + so we set the `pathMatch` value to `'full'`. 由于我们希望只有在路径明确的匹配到`''`时才重定向,所以我们往路由中添加了一个额外的配置项:`terminal: true`。 主要是为了重定向,`terminal`属性是用来控制路由器是否应该继续匹配URL和我们定义的路由。(译者注:`terminal`设置为`true`时,该路由的优先级别就低于其他路由,只有在所有其他路由都不匹配的时候才最后匹配这个路由。主要是为了标示专用于重定向的路由而设计的。) @@ -1918,7 +1913,14 @@ code-example(format=""). .l-sub-section :marked - We'll discuss redirects further in a future update to this chapter. + The other possible `pathMatch` value is `'prefix'` which tells the router + to match the redirect route to _any_ URL that _begins_ with the redirect route's _prefix_ path. + + That's not what we want in our use case. The `''` prefix path matches _every_ URL. + We should redirect to the `CrisisCenterComponent` _only_ when the _entire_ url is `''` + (or the equivalent `'/'`). + + We'll discuss redirects in more detail in a future update to this chapter. 我们将在未来的更新中深入讨论重定向问题。 diff --git a/public/docs/ts/latest/quickstart.jade b/public/docs/ts/latest/quickstart.jade index 92778fddc1..fee115315c 100644 --- a/public/docs/ts/latest/quickstart.jade +++ b/public/docs/ts/latest/quickstart.jade @@ -146,9 +146,10 @@ h2#create-and-configure 步骤1:创建并配置项目 h3 (a) Create the project folder h3 (a) 创建项目文件夹 +- var _ = _docsFor == 'dart' ? '_' : '-'; code-example(language="sh"). - mkdir angular2-quickstart - cd angular2-quickstart + mkdir angular2!{_}quickstart + cd angular2!{_}quickstart h3#add-config-files (b) Add #{_package_and_config_files} h3#add-config-files (b) 添加#{_package_and_config_filesCn} diff --git a/public/news.jade b/public/news.jade index 3276ffe6ff..5fb3ea3766 100644 --- a/public/news.jade +++ b/public/news.jade @@ -11,7 +11,7 @@ a( target="_blank" href="http://angularjs.blogspot.com/2016/06/rc4-now-available.html" - ) RC2 Now Available + ) RC4 Now Available p Today we’re happy to announce that we are shipping Angular 2.0.0-rc4. This release begins to lay the foundation for improved Angular Compilation, and makes improvements to testing.... .author img(src="/resources/images/bios/stephenfluin.jpg")