Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit e8c33a2

Browse files
committed
post-review updates
1 parent de845bf commit e8c33a2

File tree

2 files changed

+28
-26
lines changed

2 files changed

+28
-26
lines changed

public/docs/ts/_cache/tutorial/toh-pt6.jade

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,12 @@ block backend
9797
The `InMemoryWebApiModule` replaces the default `Http` client backend —
9898
the supporting service that talks to the remote server —
9999
with an _in-memory web API alternative service_.
100+
100101
+makeExcerpt(_appModuleTsVsMainTs, 'in-mem-web-api', '')
102+
101103
:marked
102104
The `forRoot` configuration method takes an `InMemoryDataService` class
103-
that will prime the in-memory database as follows:
105+
that primes the in-memory database as follows:
104106

105107
+makeExample('app/in-memory-data.service.ts', 'init')(format='.')
106108

@@ -126,7 +128,7 @@ block dont-be-distracted-by-backend-subst
126128

127129
:marked
128130
We returned a !{_Promise} resolved with mock heroes.
129-
It may have seemed like an overkill at the time, but we were anticipating the
131+
It may have seemed like overkill at the time, but we were anticipating the
130132
day when we fetched heroes with an HTTP client and we knew that would have to be an asynchronous operation.
131133

132134
That day has arrived! Let's convert `getHeroes()` to use HTTP.
@@ -140,7 +142,7 @@ block dont-be-distracted-by-backend-subst
140142

141143
- var _h3id = `http-${_promise}`
142144
:marked
143-
Refresh the browser and the hero data should be successfully loaded from the
145+
Refresh the browser, and the hero data should be successfully loaded from the
144146
mock server.
145147

146148
<h3 id="!{_h3id}">HTTP !{_Promise}</h3>
@@ -217,23 +219,21 @@ block get-heroes-details
217219
Although we made significant *internal* changes to `getHeroes()`, the public signature did not change.
218220
We still return a !{_Promise}. We won't have to update any of the components that call `getHeroes()`.
219221

220-
### Add, edit, delete heroes
222+
Our stakeholders are incredibly pleased with the added flexibility from the API integration, but it doesn't stop there. Next, we want the ability to create new heroes and delete heroes.
221223

222-
Our stakeholders are incredibly pleased with the added flexibility from the API integration, but it doesn't stop there. Next we want to add the capability to add, edit and delete heroes.
224+
But first, let's see what happens now when we try to update a hero's details.
223225

224-
We'll start with the edit feature since we have most of the capabilities already.
225-
226-
.l-main-section#edit
226+
.l-main-section
227227
:marked
228-
## Persist name changes to the server
228+
## Update hero details
229229

230230
The hero detail view already allows us to edit a hero's name. Go ahead, try
231231
it now. As we type, the hero name is updated in the view heading, but
232-
notice what happens when we hit the `Back` button: the edits are lost!
232+
notice what happens when we hit the `Back` button: the changes are lost!
233233

234234
.l-sub-section
235235
:marked
236-
Changes weren't lost before, what's happening?
236+
Updates weren't lost before, what's happening?
237237
When the app used a list of mock heroes, changes were made directly to the
238238
hero objects in the single, app-wide shared list. Now that we are fetching data
239239
from a server, if we want changes to persist, we'll need to write them back to
@@ -336,7 +336,7 @@ block get-heroes-details
336336
:marked
337337
### Hero service `delete` method
338338

339-
The delete HTTP method will be used to delete heroes and its invocation is like to `put` except for the method name:
339+
The hero service's `delete` method uses the _delete_ HTTP method to remove the hero from the server:
340340

341341
+makeExcerpt('app/hero.service.ts', 'delete')
342342

@@ -509,7 +509,8 @@ block observable-transformers
509509
- var _declarations = _docsFor == 'dart' ? 'directives' : 'declarations'
510510
- var declFile = _docsFor == 'dart' ? 'app/dashboard.component.ts' : 'app/app.module.ts'
511511
:marked
512-
And finally, we import the `HeroSearchComponent` from `'./hero-search.component.ts'`
512+
And finally, we import `HeroSearchComponent` from
513+
<span ngio-ex>hero-search.component.ts</span>
513514
and add it to the `!{_declarations}` !{_array}:
514515

515516
+makeExcerpt(declFile, 'search')

public/docs/ts/latest/tutorial/toh-pt6.jade

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,12 @@ block backend
9797
The `InMemoryWebApiModule` replaces the default `Http` client backend &mdash;
9898
the supporting service that talks to the remote server &mdash;
9999
with an _in-memory web API alternative service_.
100+
100101
+makeExcerpt(_appModuleTsVsMainTs, 'in-mem-web-api', '')
102+
101103
:marked
102104
The `forRoot` configuration method takes an `InMemoryDataService` class
103-
that will prime the in-memory database as follows:
105+
that primes the in-memory database as follows:
104106

105107
+makeExample('app/in-memory-data.service.ts', 'init')(format='.')
106108

@@ -126,7 +128,7 @@ block dont-be-distracted-by-backend-subst
126128

127129
:marked
128130
We returned a !{_Promise} resolved with mock heroes.
129-
It may have seemed like an overkill at the time, but we were anticipating the
131+
It may have seemed like overkill at the time, but we were anticipating the
130132
day when we fetched heroes with an HTTP client and we knew that would have to be an asynchronous operation.
131133

132134
That day has arrived! Let's convert `getHeroes()` to use HTTP.
@@ -140,7 +142,7 @@ block dont-be-distracted-by-backend-subst
140142

141143
- var _h3id = `http-${_promise}`
142144
:marked
143-
Refresh the browser and the hero data should be successfully loaded from the
145+
Refresh the browser, and the hero data should be successfully loaded from the
144146
mock server.
145147

146148
<h3 id="!{_h3id}">HTTP !{_Promise}</h3>
@@ -217,23 +219,21 @@ block get-heroes-details
217219
Although we made significant *internal* changes to `getHeroes()`, the public signature did not change.
218220
We still return a !{_Promise}. We won't have to update any of the components that call `getHeroes()`.
219221

220-
### Add, edit, delete heroes
222+
Our stakeholders are incredibly pleased with the added flexibility from the API integration, but it doesn't stop there. Next, we want the ability to create new heroes and delete heroes.
221223

222-
Our stakeholders are incredibly pleased with the added flexibility from the API integration, but it doesn't stop there. Next we want to add the capability to add, edit and delete heroes.
224+
But first, let's see what happens now when we try to update a hero's details.
223225

224-
We'll start with the edit feature since we have most of the capabilities already.
225-
226-
.l-main-section#edit
226+
.l-main-section
227227
:marked
228-
## Persist name changes to the server
228+
## Update hero details
229229

230230
The hero detail view already allows us to edit a hero's name. Go ahead, try
231231
it now. As we type, the hero name is updated in the view heading, but
232-
notice what happens when we hit the `Back` button: the edits are lost!
232+
notice what happens when we hit the `Back` button: the changes are lost!
233233

234234
.l-sub-section
235235
:marked
236-
Changes weren't lost before, what's happening?
236+
Updates weren't lost before, what's happening?
237237
When the app used a list of mock heroes, changes were made directly to the
238238
hero objects in the single, app-wide shared list. Now that we are fetching data
239239
from a server, if we want changes to persist, we'll need to write them back to
@@ -336,7 +336,7 @@ block get-heroes-details
336336
:marked
337337
### Hero service `delete` method
338338

339-
The delete HTTP method will be used to delete heroes and its invocation is like to `put` except for the method name:
339+
The hero service's `delete` method uses the _delete_ HTTP method to remove the hero from the server:
340340

341341
+makeExcerpt('app/hero.service.ts', 'delete')
342342

@@ -509,7 +509,8 @@ block observable-transformers
509509
- var _declarations = _docsFor == 'dart' ? 'directives' : 'declarations'
510510
- var declFile = _docsFor == 'dart' ? 'app/dashboard.component.ts' : 'app/app.module.ts'
511511
:marked
512-
And finally, we import the `HeroSearchComponent` from `'./hero-search.component.ts'`
512+
And finally, we import `HeroSearchComponent` from
513+
<span ngio-ex>hero-search.component.ts</span>
513514
and add it to the `!{_declarations}` !{_array}:
514515

515516
+makeExcerpt(declFile, 'search')

0 commit comments

Comments
 (0)