From d5417a32a2fb4771795cea8941d25f5c3cd9f07e Mon Sep 17 00:00:00 2001 From: Eric Jimenez Date: Mon, 30 May 2016 11:25:07 -0400 Subject: [PATCH 1/7] add cn language to footer --- public/_includes/_footer.jade | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/public/_includes/_footer.jade b/public/_includes/_footer.jade index 1cc8c57ace..b2e129f354 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 ul.text-body @@ -25,7 +25,7 @@ else li Community li Press Kit - .c3 + .c2 h3.text-headline HELP ul.text-body @@ -35,7 +35,7 @@ else li Report Issues li Site Feedback - .c3 + .c2 h3.text-headline COMMUNITY ul.text-body @@ -45,6 +45,11 @@ else li GitHub li Contribute + .c2 + h3.text-headline LANGUAGES + + ul.text-body + li Chinese footer(class="background-steel") small.text-caption Powered by Google ©2010-2016. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0. From 4774f4861e6d438d1177202a4ca427f7b2b1d433 Mon Sep 17 00:00:00 2001 From: Foxandxss Date: Fri, 1 Jul 2016 12:10:51 +0200 Subject: [PATCH 2/7] chore: update router to beta 2 --- public/docs/_examples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", From ed4689fd2dd769620e4c47c211217910f7110afd Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 1 Jul 2016 12:59:45 +0300 Subject: [PATCH 3/7] update title to point to correct version --- public/news.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") From 0ba3d5d8d6656e2d7fdc68ec4c8ae6485120af79 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Fri, 1 Jul 2016 11:05:45 -0700 Subject: [PATCH 4/7] docs(dart/{quickstart,toh-[56]}): fix project names (#1773) - Renamed `angular2_getting_started` to `angular2_quickstart` (to match TS). - s/-/_/g in project names elsewhere (only toh-5 & -6 needed to be updated). Fixes #378. --- public/docs/_examples/quickstart/dart/lib/app_component.dart | 3 +-- public/docs/_examples/quickstart/dart/pubspec.yaml | 2 +- public/docs/_examples/quickstart/dart/web/main.dart | 2 +- public/docs/dart/latest/quickstart.jade | 2 +- public/docs/dart/latest/tutorial/toh-pt5.jade | 4 ++-- public/docs/dart/latest/tutorial/toh-pt6.jade | 2 +- public/docs/ts/latest/quickstart.jade | 5 +++-- 7 files changed, 10 insertions(+), 10 deletions(-) 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/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/quickstart.jade b/public/docs/ts/latest/quickstart.jade index f77219aed1..588be7896f 100644 --- a/public/docs/ts/latest/quickstart.jade +++ b/public/docs/ts/latest/quickstart.jade @@ -94,9 +94,10 @@ h2#create-and-configure Step 1: Create and configure the project h3 (a) Create the project folder +- 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} block package-and-config-files From 527fe50b889a425b7c023278180a55b4db435dcf Mon Sep 17 00:00:00 2001 From: Naomi Black Date: Fri, 1 Jul 2016 13:40:09 -0700 Subject: [PATCH 5/7] footer(china): update the footer for localised docs --- public/_includes/_footer.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/_includes/_footer.jade b/public/_includes/_footer.jade index b2e129f354..c05c1e8342 100644 --- a/public/_includes/_footer.jade +++ b/public/_includes/_footer.jade @@ -49,7 +49,7 @@ else h3.text-headline LANGUAGES ul.text-body - li Chinese + li 中文版 footer(class="background-steel") small.text-caption Powered by Google ©2010-2016. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0. From 1900eb1c7005184a30df3f659417d809ff126ab4 Mon Sep 17 00:00:00 2001 From: Foxandxss Date: Fri, 1 Jul 2016 00:11:33 +0200 Subject: [PATCH 6/7] docs: replace terminal with pathMatch, base href with '/' closes #1799 --- .../crisis-center/crisis-center.routes.2.ts | 2 +- .../crisis-center/crisis-center.routes.3.ts | 2 +- .../crisis-center/crisis-center.routes.4.ts | 2 +- .../app/crisis-center/crisis-center.routes.ts | 2 +- public/docs/_examples/router/ts/index.1.html | 2 +- public/docs/_examples/router/ts/index.2.html | 2 +- public/docs/_examples/router/ts/index.3.html | 2 +- public/docs/_examples/router/ts/index.html | 2 +- .../_examples/toh-5/ts/app/app.routes.1.ts | 2 +- .../docs/_examples/toh-5/ts/app/app.routes.ts | 2 +- .../docs/_examples/toh-6/ts/app/app.routes.ts | 2 +- public/docs/ts/latest/guide/router.jade | 22 +++++++++++-------- 12 files changed, 24 insertions(+), 20 deletions(-) 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/ts/latest/guide/router.jade b/public/docs/ts/latest/guide/router.jade index f4a50cd506..fb749b68ef 100644 --- a/public/docs/ts/latest/guide/router.jade +++ b/public/docs/ts/latest/guide/router.jade @@ -975,23 +975,27 @@ code-example(format=""). That doesn't match any of our configured routes which means that our application won't display any component when it's launched. The user must click one of the navigation links to trigger a navigation and display something. - 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. - We can arrange for that behavior in several ways. - One way is to use a `redirect` to transparently navigate from one route to another. - - In our example, we'll add a route to match our initial URL and redirect to our `crisis-center` route: + The preferred solution is to add a `redirect` route that transparently translates from the initial URL (`''`) to the preferred default path (`/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'`. .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. :marked The updated route definitions look like this: From f3da5c8a36ea7621ad2958444f7f70e44f70bd23 Mon Sep 17 00:00:00 2001 From: Naomi Black Date: Fri, 1 Jul 2016 19:21:36 -0700 Subject: [PATCH 7/7] chinese(url): small change to url in footer --- public/_includes/_footer.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/_includes/_footer.jade b/public/_includes/_footer.jade index c05c1e8342..4fc97501c9 100644 --- a/public/_includes/_footer.jade +++ b/public/_includes/_footer.jade @@ -49,7 +49,7 @@ else h3.text-headline LANGUAGES ul.text-body - li 中文版 + li 中文版 footer(class="background-steel") small.text-caption Powered by Google ©2010-2016. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.