Repository navigation
docs(toh-6/dart): first edition of prose and example code - #1687
Conversation
|
FYI, an diff with a slightly cleaned-up toh-5 (soon to be committed) is informative: |
2528a05 to
2b9cdd9
Compare
| block http-library | ||
| :marked | ||
| We'll be using the !{_Angular_Http} to communicate with a server. | ||
| This class is exported by the !{_Angular_http_library}. |
There was a problem hiding this comment.
This paragraph currently says "We'll be using the Dart BrowserClient to communicate with a server. This class is exported by the Dart http library."
A more correct, natural way to say it might be:
We'll be using the http package's BrowserClient class to communicate with a server.
There was a problem hiding this comment.
I agree that it is more accurate and that it reads better. I have made the change.
FYI, the http pub page uses both terms
http
A composable, Future-based library for making HTTP requests.
This package contains a set of high-level functions ...
There was a problem hiding this comment.
Yes, I saw that too. :) I wasted a few minutes of my life thinking about what that meant, but once I saw that we couldn't get BrowserClient by importing http, muddling the library and package seemed wrong.
2b9cdd9 to
a33ed7d
Compare
| ### Edit in the *HeroDetailComponent* | ||
|
|
||
| We already have `HeroDetailComponent` for viewing details about a specific hero. | ||
| Supporting edit functionality is natural extensions of the detail view, so we are able to reuse `HeroDetailComponent` with a few tweaks. |
There was a problem hiding this comment.
natural extensions -> a natural extension
|
I didn't try following the steps, but this looks fine. I like how you simplified it (caveat: I didn't try to really understand either version). I had a few comments/questions... |
a33ed7d to
4a2c9ec
Compare
NOTE: this PR depends on angular#1686. Dart prose and example match TS except that: - No child-to-parent event emission occurs. - Support for Add Hero is added as an unconditional feature of the Heroes view. - http `_post` takes only a name - http `delete` takes only a hero id. - The Dart in-memory-data-service has been dropped in favor of an implementation based on the "standard" `http.testing.MockClient` class.
4a2c9ec to
ef2695d
Compare
NOTE: this PR depends on #1686.
Dart prose and example match the TS counterpart except that:
_posttakes only a namedeletetakes only a hero id.implementation based on the "standard"
http.testing.MockClientclass.Fixes #1595. Contributes to #2108.