From c12d75a477a1e33ea37886c0bd5942ddb9c955b3 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Mon, 14 Nov 2016 05:23:35 -0800 Subject: [PATCH 1/3] remove redundant headings --- public/docs/dart/latest/tutorial/toh-pt1.jade | 2 -- public/docs/dart/latest/tutorial/toh-pt2.jade | 1 - public/docs/dart/latest/tutorial/toh-pt4.jade | 1 - public/docs/ts/latest/tutorial/_data.json | 1 + public/docs/ts/latest/tutorial/index.jade | 4 +--- public/docs/ts/latest/tutorial/toh-pt1.jade | 2 -- public/docs/ts/latest/tutorial/toh-pt2.jade | 1 - public/docs/ts/latest/tutorial/toh-pt4.jade | 1 - public/docs/ts/latest/tutorial/toh-pt5.jade | 2 -- public/docs/ts/latest/tutorial/toh-pt6.jade | 2 -- 10 files changed, 2 insertions(+), 15 deletions(-) diff --git a/public/docs/dart/latest/tutorial/toh-pt1.jade b/public/docs/dart/latest/tutorial/toh-pt1.jade index 218d35c788..9bdb15fa08 100644 --- a/public/docs/dart/latest/tutorial/toh-pt1.jade +++ b/public/docs/dart/latest/tutorial/toh-pt1.jade @@ -1,8 +1,6 @@ include ../_util-fns :marked - # Once Upon a Time - Every story starts somewhere. Our story starts where the [QuickStart](../quickstart.html) ends. :marked diff --git a/public/docs/dart/latest/tutorial/toh-pt2.jade b/public/docs/dart/latest/tutorial/toh-pt2.jade index 24e38e31b3..e5c78afdec 100644 --- a/public/docs/dart/latest/tutorial/toh-pt2.jade +++ b/public/docs/dart/latest/tutorial/toh-pt2.jade @@ -1,7 +1,6 @@ include ../_util-fns :marked - # It Takes Many Heroes Our story needs more heroes. We’ll expand our Tour of Heroes app to display a list of heroes, allow the user to select a hero, and display the hero’s details. diff --git a/public/docs/dart/latest/tutorial/toh-pt4.jade b/public/docs/dart/latest/tutorial/toh-pt4.jade index cc417c159e..a9d5ca86e2 100644 --- a/public/docs/dart/latest/tutorial/toh-pt4.jade +++ b/public/docs/dart/latest/tutorial/toh-pt4.jade @@ -1,7 +1,6 @@ include ../_util-fns :marked - # Services The Tour of Heroes is evolving and we anticipate adding more components in the near future. Multiple components will need access to hero data and we don't want to copy and diff --git a/public/docs/ts/latest/tutorial/_data.json b/public/docs/ts/latest/tutorial/_data.json index ab92fcda11..52be9be40d 100644 --- a/public/docs/ts/latest/tutorial/_data.json +++ b/public/docs/ts/latest/tutorial/_data.json @@ -32,6 +32,7 @@ }, "toh-pt6": { "title": "HTTP", + "subtitle": "Getting and saving data", "intro": "We convert our service and components to use Angular's HTTP service", "nextable": true } diff --git a/public/docs/ts/latest/tutorial/index.jade b/public/docs/ts/latest/tutorial/index.jade index 77770baa20..dae359159d 100644 --- a/public/docs/ts/latest/tutorial/index.jade +++ b/public/docs/ts/latest/tutorial/index.jade @@ -2,9 +2,7 @@ block includes include ../_util-fns :marked - # Tour of Heroes: the vision - - Our grand plan is to build an app to help a staffing agency manage its stable of heroes. + Our grand plan for this tutorial is to build an app to help a staffing agency manage its stable of heroes. Even heroes need to find work. Of course we'll only make a little progress in this tutorial. What we do build will diff --git a/public/docs/ts/latest/tutorial/toh-pt1.jade b/public/docs/ts/latest/tutorial/toh-pt1.jade index 288b0ab189..ea319d0c57 100644 --- a/public/docs/ts/latest/tutorial/toh-pt1.jade +++ b/public/docs/ts/latest/tutorial/toh-pt1.jade @@ -1,8 +1,6 @@ include ../_util-fns :marked - # Once Upon a Time - Every story starts somewhere. Our story starts where the [QuickStart](../quickstart.html) ends. Run the for this part. diff --git a/public/docs/ts/latest/tutorial/toh-pt2.jade b/public/docs/ts/latest/tutorial/toh-pt2.jade index 3415530ca3..82941ed69b 100644 --- a/public/docs/ts/latest/tutorial/toh-pt2.jade +++ b/public/docs/ts/latest/tutorial/toh-pt2.jade @@ -1,7 +1,6 @@ include ../_util-fns :marked - # It Takes Many Heroes Our story needs more heroes. We’ll expand our Tour of Heroes app to display a list of heroes, allow the user to select a hero, and display the hero’s details. diff --git a/public/docs/ts/latest/tutorial/toh-pt4.jade b/public/docs/ts/latest/tutorial/toh-pt4.jade index 3cc1e28bcf..a5a3f494ad 100644 --- a/public/docs/ts/latest/tutorial/toh-pt4.jade +++ b/public/docs/ts/latest/tutorial/toh-pt4.jade @@ -1,7 +1,6 @@ include ../_util-fns :marked - # Services The Tour of Heroes is evolving and we anticipate adding more components in the near future. Multiple components will need access to hero data and we don't want to copy and diff --git a/public/docs/ts/latest/tutorial/toh-pt5.jade b/public/docs/ts/latest/tutorial/toh-pt5.jade index d64c457f15..e237165347 100644 --- a/public/docs/ts/latest/tutorial/toh-pt5.jade +++ b/public/docs/ts/latest/tutorial/toh-pt5.jade @@ -9,8 +9,6 @@ block includes - var _redirectTo = 'redirectTo' :marked - # Routing Around the App - We received new requirements for our Tour of Heroes application: * Add a *Dashboard* view. diff --git a/public/docs/ts/latest/tutorial/toh-pt6.jade b/public/docs/ts/latest/tutorial/toh-pt6.jade index c662d3c9b0..b6bbf982a7 100644 --- a/public/docs/ts/latest/tutorial/toh-pt6.jade +++ b/public/docs/ts/latest/tutorial/toh-pt6.jade @@ -12,8 +12,6 @@ block includes - var _promise = _Promise.toLowerCase() :marked - # Getting and Saving Data - Our stakeholders appreciate our progress. Now they want to get the hero data from a server, let users add, edit, and delete heroes, and save these changes back to the server. From 470426d5e03829442449cb59c0528811c6011c37 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Mon, 14 Nov 2016 05:25:36 -0800 Subject: [PATCH 2/3] update _cache --- public/docs/ts/_cache/tutorial/toh-pt5.jade | 2 -- public/docs/ts/_cache/tutorial/toh-pt6.jade | 21 ++++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/public/docs/ts/_cache/tutorial/toh-pt5.jade b/public/docs/ts/_cache/tutorial/toh-pt5.jade index d64c457f15..e237165347 100644 --- a/public/docs/ts/_cache/tutorial/toh-pt5.jade +++ b/public/docs/ts/_cache/tutorial/toh-pt5.jade @@ -9,8 +9,6 @@ block includes - var _redirectTo = 'redirectTo' :marked - # Routing Around the App - We received new requirements for our Tour of Heroes application: * Add a *Dashboard* view. diff --git a/public/docs/ts/_cache/tutorial/toh-pt6.jade b/public/docs/ts/_cache/tutorial/toh-pt6.jade index 007e6e77f7..b6bbf982a7 100644 --- a/public/docs/ts/_cache/tutorial/toh-pt6.jade +++ b/public/docs/ts/_cache/tutorial/toh-pt6.jade @@ -12,8 +12,6 @@ block includes - var _promise = _Promise.toLowerCase() :marked - # Getting and Saving Data - Our stakeholders appreciate our progress. Now they want to get the hero data from a server, let users add, edit, and delete heroes, and save these changes back to the server. @@ -155,7 +153,7 @@ block get-heroes-details *Observables* are a powerful way to manage asynchronous data flows. We'll learn about [Observables](#observables) later in this chapter. - For *now* we get back on familiar ground by immediately by + For *now* we get back on familiar ground by immediately converting that `Observable` to a `Promise` using the `toPromise` operator. +makeExcerpt('app/hero.service.ts', 'to-promise', '') @@ -219,7 +217,7 @@ block get-heroes-details Although we made significant *internal* changes to `getHeroes()`, the public signature did not change. We still return a !{_Promise}. We won't have to update any of the components that call `getHeroes()`. - Our stakeholders are thrilled with the added flexibility from the API integration. + Our stakeholders are thrilled with the added flexibility from the API integration. Now they want the ability to create and delete heroes. Let's see first what happens when we try to update a hero's details. @@ -229,7 +227,7 @@ block get-heroes-details ## Update hero details We can edit a hero's name already in the hero detail view. Go ahead and try - it. As we type, the hero name is updated in the view heading. + it. As we type, the hero name is updated in the view heading. But when we hit the `Back` button, the changes are lost! .l-sub-section @@ -294,7 +292,11 @@ block get-heroes-details When the given name is non-blank, the handler delegates creation of the named hero to the hero service, and then adds the new hero to our !{_array}. - Go ahead, refresh the browser and create some new heroes! + Finally, we implement the `create` method in the `HeroService` class. ++makeExcerpt('app/hero.service.ts', 'create') + +:marked + Refresh the browser and create some new heroes! .l-main-section :marked @@ -344,6 +346,7 @@ block get-heroes-details :marked Refresh the browser and try the new delete functionality. +#observables :marked ## !{_Observable}s @@ -510,7 +513,7 @@ block observable-transformers - var _declarations = _docsFor == 'dart' ? 'directives' : 'declarations' - var declFile = _docsFor == 'dart' ? 'app/dashboard.component.ts' : 'app/app.module.ts' :marked - Finally, we import `HeroSearchComponent` from + Finally, we import `HeroSearchComponent` from hero-search.component.ts and add it to the `!{_declarations}` !{_array}: @@ -532,7 +535,7 @@ figure.image-display block filetree .filetree - .file angular2-tour-of-heroes + .file angular-tour-of-heroes .children .file app .children @@ -577,7 +580,7 @@ block filetree - We configured an in-memory web API. - We learned how to use !{_Observable}s. - Here are the files we added or changed in this chapter. + Here are the files we _added or changed_ in this chapter. block file-summary +makeTabs( From 3b03573f340cc7fc43e2642bdf52fb1bae61aff0 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Mon, 14 Nov 2016 05:30:05 -0800 Subject: [PATCH 3/3] misc: make block comment a Jade comment (This prevents the text from appearing in the generated HTML as an HTML comment.) --- public/docs/ts/latest/guide/template-syntax.jade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/docs/ts/latest/guide/template-syntax.jade b/public/docs/ts/latest/guide/template-syntax.jade index ef9ab05371..d6ed35a8ce 100644 --- a/public/docs/ts/latest/guide/template-syntax.jade +++ b/public/docs/ts/latest/guide/template-syntax.jade @@ -401,7 +401,7 @@ table (element | component | directive) event, or (rarely) an attribute name. The following table summarizes: -// If you update this table, UPDATE it in Dart & JS, too. +//- If you update this table, UPDATE it in Dart & JS, too.
table tr @@ -813,7 +813,7 @@ block style-property-name-dart-diff including queries and saves to a remote server. These changes percolate through the system and are ultimately displayed in this and other views. -// +//- :marked ### Event bubbling and propagation [TODO: reinstate this section when it becomes true] Angular invokes the event-handling statement if the event is raised by the current element or one of its child elements.